import { Button } from '@imphnen-frontend-service/ui/atoms'; import { Modal } from '@imphnen-frontend-service/ui/molecules'; import { ControlledInputField } from '@imphnen-frontend-service/ui/organisms'; import { useItem, useConfirmItem } from '../_hook/use-item'; interface IModalAddItem { isOpen: boolean; onClose: () => void; handleAddItem?: () => void; currentStep?: number; nextStep: () => void; prevStep: () => void; resetStep: () => void; } const ModalAddItem = ({ isOpen, onClose, currentStep, nextStep, resetStep, handleAddItem, }: IModalAddItem) => { return ( { onClose(); resetStep(); }} disableEscapeKeyDown={true} > {currentStep === 1 && } {currentStep === 2 && ( )} ); }; interface IStepOneProps { nextStep: () => void; onClose: () => void; } const StepOne = ({ nextStep }: IStepOneProps) => { const { form, onSubmit } = useItem(nextStep); return ( <> Tambah Item Roll Gacha Lengkapi detal di bawah ini, untuk menambahkan item gacha Tambahkan Item > ); }; interface IStepTwoProps { onClose: () => void; handleAddItem?: () => void; resetStep: () => void; } const StepTwo = ({ onClose, handleAddItem, resetStep }: IStepTwoProps) => { const { onConfirm, onCancel } = useConfirmItem( onClose, resetStep, handleAddItem ); return ( <> Tambah ke Roll Gacha Apakah kamu yakin ingin menambahkan item ini ke roll gacha? Batal Tambahkan > ); }; export default ModalAddItem;
Lengkapi detal di bawah ini, untuk menambahkan item gacha
Apakah kamu yakin ingin menambahkan item ini ke roll gacha?