"use client";
import PageTitle from "@/core/components/PageTitle";
import {Dialog, DialogTitle, IconButton, Stack, Tooltip} from "@mui/material";
import {useState} from "react";
import DriveEtaIcon from "@mui/icons-material/DriveEta";
import CarDetailsContent from "@/components/dashboard/carDetails/CarDetailsContent";

const TestPage = () => {
    const [openCarDialog, setOpenCarDialog] = useState(false)
    return (
        <Stack spacing={1}>
            <PageTitle title={"نمایش اطلاعات خودرو"} />
            <>
                <Tooltip title="نمایش اطلاعات خودرو">
                    <IconButton
                        color="primary"
                        onClick={() => {
                            setOpenCarDialog(true);
                        }}
                    >
                        <DriveEtaIcon />
                    </IconButton>
                </Tooltip>
                <Dialog
                    onClose={()=>setOpenCarDialog(false)}
                    fullWidth
                    open={openCarDialog}
                    PaperProps={{
                        sx: {
                            transition: "all .3s",
                            boxShadow: "rgba(60, 64, 67, 0.3) 0px 1px 16px 0px, rgba(60, 64, 67, 0.15) 0px 1px 10px 0px",
                        },
                    }}
                    maxWidth={"lg"}
                >
                    <DialogTitle>
                        نمایش اطلاعات خودرو
                    </DialogTitle>
                    <CarDetailsContent setOpenCarDialog={setOpenCarDialog} />
                </Dialog>
            </>
        </Stack>
    );
};
export default TestPage;
