import { IGtTableHeader } from "../models/anna-non-editable-gt-models"; import * as i0 from "@angular/core"; export declare class CustomizableColumnsService { /** * Applies table preferences by updating table headers visibility and checked state. * Each group is treated independently so we can keep filter metadata aligned with the rendered columns. * * @param tableHeaders List of header groups whose visibility state should be updated. * @param selectedColumnNames Column keys coming from stored preferences. */ applyColumnPreferences(tableHeaders: IGtTableHeader[], selectedColumnNames: string[]): void; /** * Ensures a header carries immutable copies of its default filter/tooltip configuration. * * @param header Header definition that needs default metadata cached once. */ private preserveHeaderDefaults; /** * Determines whether a filter configuration contains actionable data. * * @param config Immutable default filter configuration to inspect. * @returns True when filter-related arrays or filter definitions are present. */ private hasFilterSettings; /** * Applies filter state for a header group based on visible headers and the selected filter header. * The first visible column becomes the single filter owner to avoid duplicate filter icons. * * @param headerGroup Target header group whose aggregate visibility state changes. * @param visibleHeaders Headers currently rendered in the UI for this group. * @param firstHeaderWithFilter First visible header that carries filter metadata, if any. * @param groupHasFilters Indicates whether any header in the group exposes filtering. * @param headersWithFilters List of all headers that contain filter metadata (visible or hidden). */ private alignGroupFilterState; /** * Applies filter configuration to header info and updates active filter states. * * @param header Target header whose mutable properties must stay in sync with defaults. * @param config Filter configuration to apply (undefined clears filter data and icons). */ private setHeaderFilterConfig; /** * Picks a header that owns the filter metadata to project on the visible columns. * Since we use positional mapping (header position → filterSortObjectKeys index), * we need a header that has filterSortObjectKeys to map from. We prefer the first visible * header that has filterSortObjectKeys, otherwise fall back to any header with filterSortObjectKeys. * * @param preferredHeader First visible header that carries filter metadata, if available. * @param headersWithFilters All headers that contain filter metadata (visible or hidden). * @returns Header whose defaults should drive the filter UI (preferably one with filterSortObjectKeys). */ private pickFilterSourceHeader; /** * Keeps filter metadata in sync with the columns that remain visible. * Maps visible headers to their corresponding filter keys by position in the header group. * * @param defaultConfig Original filter configuration attached to the header. * @param visibleHeaders Headers currently rendered in the UI for this group. * @param headerGroup Header group containing all headers (used to determine header positions). * @returns Filter configuration aligned with the current visibility state. */ private buildVisibleFilterConfig; /** * Extracts selected (checked) column object keys from table headers. * * @param tableHeaders Table headers to evaluate. * @returns Array of selected column object keys (only non-fixed columns). */ collectSelectedColumnKeys(tableHeaders: IGtTableHeader[]): string[]; /** * Gets the count of fixed header groups in the customizable columns list. * * @param tableHeaders Table headers to count fixed groups from. * @returns Number of fixed header groups that should always remain visible. */ countFixedHeaderGroups(tableHeaders: IGtTableHeader[]): number; /** * Checks if visible columns have changed between previous and new headers. * * @param previousHeaders Previous snapshot of header groups. * @param newHeaders Updated header groups to compare against. * @returns True if visible column keys differ, false otherwise. */ haveVisibleColumnKeysChanged(previousHeaders: IGtTableHeader[], newHeaders: IGtTableHeader[]): boolean; /** * Extracts all visible column keys from table headers so diffs are quick and reliable. * * @param headers Complete set of header groups to inspect. * @returns Set of object keys representing currently visible columns. */ collectVisibleColumnKeys(headers: IGtTableHeader[]): Set; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }