import { IGridConfig } from "@sankhyalabs/ezui/dist/types/components/ez-grid/controller/EzGridController";
import { SnkFilterItemConfig } from "../../components/snk-filter-bar/filter-item/snk-filter-item";
import { IFormCardConfig, IFormConfig } from "@sankhyalabs/ezui/dist/types/utils/form/interfaces";
import { ISaveResourceResponse } from "../http/data-fetcher/fetchers/resource-fetcher";
import { IPersonalizedFilter, IValidateFilter } from "../../components/snk-personalized-filter/interfaces/IPersonalizedFilter";
export declare enum CONFIG_SOURCE {
  form = "form",
  grid = "grid",
  filterBar = "filterBar"
}
export interface ILegacyConfigNameParams {
  gridLegacyConfig?: string;
  formLegacyConfig?: string;
}
export declare class ConfigStorage {
  private static readonly LEGACY_CONFIG_NAME_ERROR_MESSAGE;
  private static filterBarLegacyConfig;
  private static formLegacyConfig;
  private static gridLegacyConfig;
  private static configById;
  private static filterBarConfigFetcher;
  private static formConfigFetcher;
  private static gridConfigFetcher;
  private static personalizedFilterFetcher;
  static addFilterBarLegacyConfig(configName: string, legacyConfigName: string): void;
  static addFormLegacyConfig(configName: string, legacyConfigName: string): void;
  static addGridLegacyConfig(configName: string, legacyConfigName: string): void;
  static preload(resourceID: string, configName: string, legacyConfigs?: ILegacyConfigNameParams): void;
  static loadFilterBarConfig(name: string, resourceID: string, urlParams?: object): Promise<Array<SnkFilterItemConfig>>;
  static loadFormConfig(name: string, resourceID: string): Promise<IFormConfig>;
  static loadGridConfig(name: string, resourceID: string): Promise<IGridConfig>;
  static saveFilterBarConfig(config: Array<SnkFilterItemConfig>, name: string, resourceID: string): Promise<ISaveResourceResponse>;
  static saveFormConfig(config: IFormConfig, name: string, resourceID: string): Promise<IFormConfig>;
  static saveCardState(config: Map<string, IFormCardConfig>, name: string, resourceID: string): Promise<Map<string, IFormCardConfig>>;
  static getDefaultGridConfig(resourceId: string): Promise<IGridConfig>;
  static saveGridConfig(config: IGridConfig, name: string, resourceID: string): Promise<IGridConfig>;
  static loadDefaultFilter(filterId: string, resourceID: string, configName?: string): Promise<IPersonalizedFilter>;
  static loadPersonalizedFilter(filterId: string, resourceID: string, configName?: string): Promise<IPersonalizedFilter>;
  static savePersonalizedFilter(personalizedFilter: IPersonalizedFilter, resourceID: string, configName?: string): Promise<IPersonalizedFilter>;
  static saveDefaultFilter(personalizedFilter: IPersonalizedFilter, resourceID: string, configName?: string): Promise<IPersonalizedFilter>;
  static removeDefaultFilter(personalizedFilter: IPersonalizedFilter, resourceID: string, configName?: string): Promise<IPersonalizedFilter>;
  static removePersonalizedFilter(personalizedFilter: IPersonalizedFilter, resourceID: string, configName?: string): Promise<IPersonalizedFilter>;
  static validatePersonalizedFilter(dataUnitName: string, expression: string): Promise<IValidateFilter>;
  static deleteGridConfigCache(name: string, resourceID: string): Promise<void>;
  static deleteFormConfigCache(name: string, resourceID: string): Promise<void>;
  static deleteFilterBarConfigCache(name: string, resourceID: string): Promise<void>;
  private static validateResourceId;
  private static handleLegacyConfig;
  private static handleLegacyConfigAsString;
  private static deleteConfigCache;
  private static buildCacheID;
}
