import React, { Component } from "react";
import ContentWrapper from "@/components/Layout/ContentWrapper";
import { Row, Col } from "reactstrap";
import { getPelaporan } from "@/actions/pelaporan";
import CaseProgress from "@/components/Main/CaseProgress";
import TableLaporan from "@/components/Sanksi/TableLaporan";

class Sanksi extends Component {
	constructor(props) {
		super(props);
		this.state = {
			pelaporan: {},
		};
	}

	componentDidMount = async () => {
		const pelaporan = await getPelaporan({ pemeriksaan: true, active: true });
		this.setState({ pelaporan });
	};

	render() {
		const { pelaporan } = this.state;
		return (
			<ContentWrapper>
				<div className="content-heading">Sanksi</div>
				<Row>
					<Col lg="4">
						<CaseProgress />
					</Col>
					<Col lg="8">
						<TableLaporan listData={pelaporan?.data} />
					</Col>
				</Row>
			</ContentWrapper>
		);
	}
}

export default Sanksi;
