import { BtnWrapper, ButtonClose, ModalText } from '../../../styles/Components';
import Button from '../button/Button';
import Modal from './Modal';

const CustomConfirmModal = ({view, handleClose, handleCancel, handleSubmit, ChildView}) => {
	return (
		<Modal min="440px" $padding="40px" $bgcolor="transparent" $view={view}>
			<BtnWrapper $justify="flex-end">
				<ButtonClose onClick={handleClose} />
			</BtnWrapper>
			<ModalText $align="center">
				{ChildView && <ChildView />}
			</ModalText>
			<BtnWrapper $gap="10px">
				<Button text="취소" theme="line" size="large" width="100%" handleClick={handleCancel} />
				<Button
					text="확인"
					theme="primary"
					type="submit"
					size="large"
					width="100%"
					handleClick={handleSubmit}
				/>
			</BtnWrapper>
		</Modal>
	);
}

export default CustomConfirmModal;