import { Button } from '@imphnen-frontend-service/ui/atoms'; import { InputField, Modal } from '@imphnen-frontend-service/ui/molecules'; import { useConfirmItem, useItem } from '../_hook/use-item'; import { ControlledInputField } from '@imphnen-frontend-service/ui/organisms'; interface IModalEditItem { isOpen: boolean; onClose: () => void; handleEditItem?: () => Promise; currentStep?: number; nextStep: () => void; prevStep: () => void; resetStep: () => void; } const ModalEditItem = ({ isOpen, onClose, currentStep, nextStep, resetStep, handleEditItem, }: IModalEditItem) => { return ( { onClose(); resetStep(); }} disableEscapeKeyDown={true} > {currentStep === 1 && } {currentStep === 2 && ( )} ); }; interface IStepOneProps { nextStep: () => void; onClose: () => void; } const StepOne = ({ nextStep }: IStepOneProps) => { const initialValues = { itemName: 'Hoodie IMPHNEN Official 2025', quantity: 10, }; const { form, onSubmit } = useItem(nextStep, initialValues); return ( <>

Edit Item Gacha

Silakan mengubah detail dari item yang diperlukan

); }; interface IStepTwoProps { onClose: () => void; handleEditItem?: () => Promise; resetStep: () => void; } const StepTwo = ({ onClose, handleEditItem, resetStep }: IStepTwoProps) => { const { onConfirm, onCancel } = useConfirmItem( onClose, resetStep, handleEditItem, { success: 'Perubahan item berhasil dilakukan', error: 'Perubahan item gagal dilakukan', } ); return ( <>

Update Item

Apakah kamu yakin dengan
perubahan yang dilakukan?

); }; export default ModalEditItem;