import React, { Component } from "react";
import Header from "@/components/Main/Header";
import DetailPT from "@/components/Main/DetailPT";
import InputData from "@/components/Pelaporan/InputData";
import Link from "next/link";

import ContentWrapper from "@/components/Layout/ContentWrapper";
import { Row, Col, Card, CardHeader, CardBody } from "reactstrap";

class PelaporanNew extends Component {
	static getInitialProps = async ({ query }) => {
		return { query };
	};

	render() {
		return (
			<ContentWrapper unwrap>
				<Header />
				<div className="p-3">
					<div className="content-heading">
						<div>
							Pelaporan Baru
							<small>Form pembuatan laporan baru v.0.1</small>
						</div>
						<div className="ml-auto">
							<Link href="/app/pelaporan/search">
								<button className="btn btn-sm btn-secondary text-sm">&lt; back</button>
							</Link>
						</div>
					</div>
					<Row>
						<Col xl="9">
							<Card className="card-default">
								<CardBody>
									<Row>
										<Col lg={12}>
											<p className="lead bb">Informasi Laporan</p>
											<InputData query={this.props.query} />
										</Col>
									</Row>
								</CardBody>
							</Card>
						</Col>
						<Col xl="3">
							<DetailPT />
						</Col>
					</Row>
				</div>
			</ContentWrapper>
		);
	}
}

export default PelaporanNew;
