import { Button, Checkbox, Form, Input } from "antd"; import ProPhoneInput from "components/ProPhoneInput"; import { GiftDetailsType } from "features/order/orderSlice"; import { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { ProBottomSheet } from "../ProBottomSheet/ProBottomSheet"; import ProText from "../ProText"; const { TextArea } = Input; interface GiftBottomSheetProps { isOpen: boolean; onClose: () => void; initialValue: GiftDetailsType | null; onSave: (value: GiftDetailsType) => void; } export function GiftBottomSheet({ isOpen, onClose, initialValue, onSave, }: GiftBottomSheetProps) { const { t } = useTranslation(); const [giftForm] = Form.useForm(); useEffect(() => { giftForm.setFieldsValue(initialValue); }, [initialValue, giftForm]); const handleSave = () => { onSave(giftForm.getFieldsValue()); giftForm.resetFields(); onClose(); }; const handleCancel = () => { giftForm.setFieldsValue(initialValue); giftForm.resetFields(); onClose(); }; return (