'use client';
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
import { useModal } from '@faceless-ui/modal';
import React from 'react';
import { useTranslation } from '../../../providers/Translation/index.js';
import { ConfirmationModal } from '../../ConfirmationModal/index.js';
import { useBulkUpload } from '../index.js';
export const discardBulkUploadModalSlug = 'bulk-upload--discard-without-saving';
export function DiscardWithoutSaving() {
    const { t } = useTranslation();
    const { closeModal } = useModal();
    const { drawerSlug } = useBulkUpload();
    const onCancel = React.useCallback(()=>{
        closeModal(discardBulkUploadModalSlug);
    }, [
        closeModal
    ]);
    const onConfirm = React.useCallback(()=>{
        closeModal(drawerSlug);
        closeModal(discardBulkUploadModalSlug);
    }, [
        closeModal,
        drawerSlug
    ]);
    return /*#__PURE__*/ _jsxDEV(ConfirmationModal, {
        body: t('general:changesNotSaved'),
        cancelLabel: t('general:stayOnThisPage'),
        confirmLabel: t('general:leaveAnyway'),
        heading: t('general:leaveWithoutSaving'),
        modalSlug: discardBulkUploadModalSlug,
        onCancel: onCancel,
        onConfirm: onConfirm
    }, void 0, false, {
        fileName: "src/elements/BulkUpload/DiscardWithoutSaving/index.tsx",
        lineNumber: 26,
        columnNumber: 5
    }, this);
}

//# sourceMappingURL=index.js.map