import { useState } from "react";
import Hour from "./hour";
import Time from "./Time";

function Date({ doctor, setStep }) {
  const [locateVisit, setLocateVisit] = useState(true);
  const [date, setDate] = useState();

  return (
    <div className="w-full lg:w-[61%]">
      <div
        className="p-0 lg:p-[24px] rounded-[8px] border border-solid border-transparent lg:border-[#EFEFEF] 
            bg-transparent lg:bg-[#FFF]"
      >
        <Time
          setDate={setDate}
          locateVisit={locateVisit}
          isStep={doctor?.multiwork ? locateVisit : true}
        />
        <Hour
          isStep={doctor?.multiwork ? locateVisit : true}
          setLocateVisit={setLocateVisit}
          locateVisit={locateVisit}
          setStep={setStep}
          doctor={doctor}
          date={date}
        />
      </div>
    </div>
  );
}

export default Date;
