import { Button } from '@imphnen-frontend-service/ui/atoms'; import { Modal } from '@imphnen-frontend-service/ui/molecules'; import { useConfirmItem, useItem } from '../_hook/use-item'; import { ControlledInputField } from '@imphnen-frontend-service/ui/organisms'; interface IModalUpdateItem { isOpen: boolean; onClose: () => void; handleUpdateItem?: () => Promise; currentStep?: number; nextStep: () => void; prevStep: () => void; resetStep: () => void; } const ModalUpdateItem = ({ isOpen, onClose, currentStep, nextStep, resetStep, handleUpdateItem, }: IModalUpdateItem) => { 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, chanceRate: 0.1, }; const { form, onSubmit } = useItem(nextStep, initialValues); return ( <>

Update Item Roll Gacha

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

Update Item

Apakah kamu yakin dengan
perubahan yang dilakukan?

); }; export default ModalUpdateItem;