"use client";

import Form from "./form";
import { useState } from "react";
import { defaultState } from "./defaultState";
import UploadFile from "@/app/component/uploadFile";

function AddDoctorPage() {
  const [data, setData] = useState(defaultState);
  const [image, setImage] = useState("");

  const resetData = () => {
    setData(defaultState);
    setImage();
  };

  return (
    <div className="opacity-page bg-transparent dark:shadow-[0px_4px_25px_10px_#1F1D2B] md:dark:bg-[#222433] md:bg-[#FFF] opacity-page rounded-[8px] shadow-none md:shadow-[0px_1px_24.8px_0px_rgba(204,204,204,0.18)] pt-0 md:pt-[12px] lg:pt-[24px] px-0 md:px-[24px] p-[24px]">
      <UploadFile image={image} setImage={setImage} />
      <Form
        data={data}
        image={image}
        parent={parent}
        setData={setData}
        resetData={resetData}
      />
    </div>
  );
}

export default AddDoctorPage;
