import { ProBottomSheet } from "components/ProBottomSheet/ProBottomSheet.tsx";
import PickupEstimateContent from "pages/checkout/components/pickupEstimate/Content.tsx";
import { useTranslation } from "react-i18next";

interface PickupEstimateBottomSheetProps {
  isOpen: boolean;
  onClose: () => void;
  onSave: (date: string, time: string) => void;
}

export function PickupEstimateBottomSheet({
  isOpen,
  onClose,
  onSave,
}: PickupEstimateBottomSheetProps) {
  const { t } = useTranslation();

  return (
    <ProBottomSheet
      isOpen={isOpen}
      onClose={onClose}
      title={t("checkout.setPickupTime")}
      showCloseButton={true}
      initialSnap={1}
      height={550}
      snapPoints={[550]}
    >
      <PickupEstimateContent onSave={onSave} onClose={onClose} />
    </ProBottomSheet>
  );
}
