"use client";

import Detail from "./Detail";
import Head from "./Head";

function Information({ doctor, step, setStep, typePay, isPay, disableSide, selectedSlot, selectedDate }) {
  return (
    <div
      className={`w-full lg:w-[41%] relative ${disableSide ? "hidden lg:flex" : "" }`}
    >
      <div
        className={`p-[12px] sm:p-[16px] md:p-[20px] lg:p-[24px] sticky right-0 w-full opacity-page rounded-[8px] border border-solid border-[#EFEFEF] bg-[#FFF] top-[calc(12px_+_75px_+_32px)] sm:top-[calc(21px_+_75px_+_45px)] md:top-[calc(30px_+_75px_+_58px)] lg:top-[calc(40px_+_75px_+_78px)] ${typePay === "success" || typePay === "failed" ? "hidden md:block" : "block" } `}
      >
        <p className="text-[#3B3B3B] text-[14px] sm:text-[16px] md:text-[18px] lg:text-[20px] font-bold">
          جزئیات نوبت
        </p>
        <Head doctor={doctor} />
        <Detail
          doctor={doctor}
          step={step}
          setStep={setStep}
          selectedSlot={selectedSlot}
          selectedDate={selectedDate}
        />
      </div>
    </div>
  );
}

export default Information;
