// (C) 2024-2026 GoodData Corporation
import { getAutomationDashboardFilters } from "../../../_staging/automation/index.js";
import { useAutomationAvailableDashboardFilters } from "./useAutomationAvailableDashboardFilters.js";
/**
 * Hook for getting filters for dashboard scheduled export.
 *
 * If scheduledExportToEdit is provided, it returns its saved filters as is.
 * If scheduledExportToEdit is not provided, it returns sanitized filters ready to be saved in new scheduled export.
 *
 * @deprecated - can be removed, once `enableAutomationFilterContext` is removed
 */
export const useDashboardScheduledExportFilters = ({ scheduledExportToEdit, }) => {
    const savedScheduledExportFilters = scheduledExportToEdit
        ? getAutomationDashboardFilters(scheduledExportToEdit)
        : undefined;
    const availableDashboardFilters = useAutomationAvailableDashboardFilters();
    return savedScheduledExportFilters ?? availableDashboardFilters;
};
//# sourceMappingURL=useDashboardScheduledExportFilters.js.map