import { useTranslation } from 'react-i18next' import { memo } from 'react' import OLModal, { OLModalBody, OLModalFooter, OLModalHeader, OLModalTitle, } from '@/features/ui/components/ol/ol-modal' import OLButton from '@/features/ui/components/ol/ol-button' import { ButtonProps } from '@/features/ui/components/types/button-props' export type GenericConfirmModalOwnProps = { title: string message: string onConfirm: () => void confirmLabel?: string primaryVariant?: ButtonProps['variant'] } type GenericConfirmModalProps = React.ComponentProps & GenericConfirmModalOwnProps function GenericConfirmModal({ title, message, confirmLabel, primaryVariant = 'primary', ...modalProps }: GenericConfirmModalProps) { const { t } = useTranslation() const handleConfirmClick = modalProps.onConfirm return ( {title} {message} modalProps.onHide()}> {t('cancel')} {confirmLabel || t('ok')} ) } export default memo(GenericConfirmModal)