import { type FilterContextItem, type IDashboard, type IDashboardObjectIdentity, type IDateFilterConfig, type IFilterContextDefinition } from "@gooddata/sdk-model";
import { type IDashboardFilter } from "../../types.js";
/**
 * Given a dashboard, this function will inspect its filter context and always return a valid instance of IFilterContextDefinition to use.
 *
 * The filter context definition represents a filter context that may or may not be already persisted on the backend. As such, this is
 * ideal to represent all possible states:
 *
 * 1. Dashboard has a persisted filter context
 * 2. Dashboard has no persisted filter context, in which case a new, default context should be used
 * 3. Dashboard is being exported and uses a temporary filter context that may stored in a different persistence store and
 *    possibly in a different format - while holding the same information.
 *
 * The filter context will be validated and sanitized so that any bad items (that may be added through rest API without validation)
 * will be removed.
 *
 * TODO: it's worth considering whether the temp filter context should be rather hidden as an impl detail and not exposed via SPI.
 *
 * @param dashboard - dashboard to get filter context from
 * @param dateFilterConfig - date filter config to use in case default filter context has to be created
 * @param filters - predefined filters
 */
export declare function dashboardFilterContextDefinition<TWidget>(dashboard: IDashboard<TWidget> | null | undefined, dateFilterConfig: IDateFilterConfig, filters?: FilterContextItem[]): IFilterContextDefinition;
/**
 * Given a dashboard, this function will return identity information about the filter context used by the dashboard.
 *
 * If the dashboard has no filter context or a temporary filter context (used during exports) the identity
 * will be undefined. This should be indication to the caller that whatever the filter context the dashboard
 * is working with is not persisted.
 *
 * @param dashboard - dashboard to get filter context from.
 */
export declare function dashboardFilterContextIdentity<TWidget>({ filterContext }: IDashboard<TWidget>): IDashboardObjectIdentity | undefined;
/**
 * This function will sanitize the filter context and remove invalid entries:
 *
 * 1.  Attribute filters that are setup with parent filters, but those parent filters do not exist in the contex.
 */
export declare function dashboardFilterContextSanitize(filterContext: IFilterContextDefinition): IFilterContextDefinition;
/**
 * Transform supported dashboard filter to filter context item.
 *
 * Returns undefined when the input has no honest representation in the dashboard filter context —
 * specifically for insight-originated MVFs that reference the measure via LocalIdRef (bucket localId).
 * Dashboard MVFs require an ObjRef measure; callers receiving alert/automation execution filters
 * (which mix dashboard and insight filters) should drop the undefined entries.
 */
export declare function dashboardFilterToFilterContextItem(filter: IDashboardFilter, keepDatasets: boolean): FilterContextItem | undefined;
//# sourceMappingURL=dashboardFilterContext.d.ts.map