import { jsx as _jsx } from "react/jsx-runtime";
import { FormattedMessage, defineMessages, useIntl } from "react-intl";
import { ConfirmDialog, Message } from "@gooddata/sdk-ui-kit";
const messages = defineMessages({
    title: { id: "dialogs.automation.applyCurrentFilters.confirm.title" },
    submit: { id: "dialogs.automation.applyCurrentFilters.confirm.submit" },
    alertText: { id: "dialogs.automation.applyCurrentFilters.alert.confirm" },
    scheduleText: { id: "dialogs.automation.applyCurrentFilters.schedule.confirm" },
});
export function ApplyCurrentFiltersConfirmDialog({ automationType, onCancel, onEdit, }) {
    const intl = useIntl();
    return (_jsx(ConfirmDialog, { displayCloseButton: true, isPositive: true, headline: intl.formatMessage(messages.title), cancelButtonText: intl.formatMessage({ id: "cancel" }), submitButtonText: intl.formatMessage(messages.submit), onSubmit: onEdit, onClose: onCancel, onCancel: onCancel, className: "s-automation-apply-current-filters-dialog", children: _jsx(Message, { type: "warning", children: _jsx(FormattedMessage, { id: automationType === "alert" ? messages.alertText.id : messages.scheduleText.id, values: {
                    b: (chunks) => _jsx("strong", { children: chunks }),
                } }) }) }));
}
