import { jsx as _jsx } from "react/jsx-runtime";
// (C) 2021-2026 GoodData Corporation
import { useIntl } from "react-intl";
import { ExportDialog } from "@gooddata/sdk-ui-kit";
import { useExportXlsxDialogContext } from "../dashboardContexts/ExportXlsxDialogContext.js";
/**
 * @internal
 */
export function ExportXlsxDialogProvider() {
    const { closeDialog, dialogConfig, isOpen } = useExportXlsxDialogContext();
    const intl = useIntl();
    return isOpen ? (_jsx(ExportDialog, { headline: intl.formatMessage({ id: "dialogs.export.headline" }), cancelButtonText: intl.formatMessage({ id: "cancel" }), submitButtonText: intl.formatMessage({ id: "dialogs.export.submit" }), filterContextText: intl.formatMessage({ id: "dialogs.export.includeFilters" }), filterContextTitle: intl.formatMessage({ id: "dialogs.export.filters" }), mergeHeadersText: intl.formatMessage({ id: "dialogs.export.mergeHeaders" }), mergeHeadersTitle: intl.formatMessage({ id: "dialogs.export.cells" }), onCancel: closeDialog, ...dialogConfig })) : null;
}
