import { ProBottomSheet } from "components/ProBottomSheet/ProBottomSheet.tsx";
import Content from "pages/cart/components/timeEstimate/Content.tsx";
import { useTranslation } from "react-i18next";

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

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

  return (
    <ProBottomSheet
      isOpen={isOpen}
      onClose={onClose}
      title={t("cart.selectTimeEstimate")}
      showCloseButton={true}
      initialSnap={1}
      height={495}
      snapPoints={[495]}
    >
      <Content onSave={onSave} onClose={onClose} />
    </ProBottomSheet>
  );
}
