import { QdFilterType } from './filter-types.interface';
import { Observable } from 'rxjs';
import { OptionalProperty, RequiredProperty } from '../../core/types/utility.types';
export interface QdFilterConfigData {
    categories: QdFilterCategory[];
    /**
     * Enables instant filtering behavior.
     *
     * When set to `true`, the filter will emit outputs immediately when the user selects or deselects a filter item.
     * This mode removes the need for a separate filter button and automatically reacts to every interaction.
     *
     * **Note:**
     * - The filter and reset buttons are **hidden** when `isInstantFiltering` is enabled.
     * - Each selection is immediately applied, without any staging.
     *
     * * @default false
     */
    isInstantFiltering?: boolean;
    /**
     * @description Sets a unique identifier for the filter. Used as key to hold in NgRx store. Set a uid to preserve the
     * filter selection when navigating, for example between detail and overview page.
     *
     * * @default: random RFC 4122 Identifier
     */
    uid?: string;
    /**
     * Defines the format of the query string output.
     * If not set or true (default) the legacy format is used for the query string output.
     * * @default true
     *
     * The legacy query string format uses the following symbols:
     * * category to items assigner: $
     * * item separator: +
     * * category separator: &
     *
     * If set to false the query string output uses the new format with the following symbols:
     * * category to items assigner: $
     * * item separator: §
     * * category separator: |
     */
    outputLegacyQueryStringFormat?: boolean;
    /**
     * If true the filter is connected with the router. Then the filter selection is saved
     * in the url filter query parameter for every filtering. When the application is reopened
     * the filter query parameter is parsed to set the initial selection.
     *
     * If you use more than one filter on a page,
     * this property has to be set to false except for one filter
     * because only one filter per page can be connected with the router.
     *
     * * @default true
     */
    connectWithRouter?: boolean;
    /**
     * When this property is set, the outputs will always be emitted initially.
     * Otherwise the outputs will be emitted initially only if some category is initially active.
     *
     * * @default false
     */
    emitOutputsInitially?: boolean;
}
export type QdFilterCategory = QdStaticFilterCategory | QdDependentFilterCategory;
export type QdResolvedFilterCategory = RequiredProperty<QdFilterCategory, 'items'>;
export interface QdStaticFilterCategory {
    category: string;
    type: QdFilterType;
    i18n?: string;
    items: QdFilterItem[];
    filter?: boolean;
}
export type QdDependentFilterCategory = OptionalProperty<QdStaticFilterCategory, 'items'> & {
    dependsOn: string[];
    itemsResolver: (categories: QdResolvedFilterCategory[]) => Observable<QdFilterItem[]>;
};
export interface QdFilterSelection {
    [category: string]: QdFilterItem['item'][];
}
export interface QdFilterItem {
    item: string;
    i18n?: string;
    active?: boolean;
    hidden?: boolean;
}
//# sourceMappingURL=filter-config.interface.d.ts.map