import ArrowLeftPA from "@/components/icons/ArrowLeftPA";
import { Button } from "@mui/material";
import Form from "./Form";
import { checkAllValues } from "@/helper";

function OfficeInformation({ setValue, parent, data, setData }) {
  return (
    <div className="opacity-page pb-[24px] px-0 md:px-[24px] lg:px-[56px]">
      <Form parent={parent} setData={setData} data={data.office} />
      <div className="mt-[40px] w-full flex justify-end">
        <Button
          className={`!w-full md:!w-fit !shadow-none !rounded-[4px] !gap-[4px] !text-[#EFEFEF] !text-[14px] md:!text-[16px] !font-medium
            ${!checkAllValues(data) && "opacity-60"}`}
          disabled={!checkAllValues(data)}
          onClick={() => setValue((prev) => prev + 1)}
          variant="contained"
        >
          ثبت اطلاعات
          <ArrowLeftPA />
        </Button>
      </div>
    </div>
  );
}

export default OfficeInformation;
