import { Box } from "@mui/material";
import { Grid } from "../components/grid/Grid";
import { SPACING } from "../data/spacing";
import { useLocation } from "react-router-dom";
import {
  ROUTE_PROVINCE_FINANCIAL_DOCUMENT_REGISTRATION,
  ROUTE_PROVINCE__FINANCIAL_USER_FINACIAL_FILE,
} from "../routes/routes";
import { ProvinceFinancialDocumentRegistration } from "../features/province-finacial/components/province-financial-document-register/ProvinceFinancialDocumentRegister";
import ProvinceFinancialUserFinancial from "../features/province-finacial/components/province-financial-user-financial/ProvinceFinancialUserFinancial";

const ProvinceFinancialDocumentRegister = () => {
  const { pathname } = useLocation();

  return (
    <>
      <Box display={"flex"} justifyContent="center">
        <Grid
          container
          direction="column"
          justifyContent="center"
          xs={12}
          sm={12}
          md={10}
          lg={10}
        >
          <Grid container justifyContent="space-between" gap={SPACING.SMALL}>
            <Grid xs={12}>
              {pathname.includes(
                ROUTE_PROVINCE_FINANCIAL_DOCUMENT_REGISTRATION
              ) && <ProvinceFinancialDocumentRegistration />}

              {pathname.includes(
                ROUTE_PROVINCE__FINANCIAL_USER_FINACIAL_FILE
              ) && <ProvinceFinancialUserFinancial />}
            </Grid>
          </Grid>
        </Grid>
      </Box>
    </>
  );
};
export default ProvinceFinancialDocumentRegister;
