import { Location } from '@angular/common'; import { LanguageCode } from '../../common/generated-types'; import { WidgetLayoutDefinition } from '../dashboard-widget/dashboard-widget-types'; import * as i0 from "@angular/core"; export type DataTableConfig = { [id: string]: { visibility: string[]; order: { [id: string]: number; }; showSearchFilterRow: boolean; filterPresets: Array<{ name: string; value: string; }>; }; }; export type LocalStorageTypeMap = { activeChannelToken: string; authToken: string; uiLanguageCode: LanguageCode; uiLocale: string | undefined; contentLanguageCode: LanguageCode; dashboardWidgetLayout: WidgetLayoutDefinition; activeTheme: string; livePreviewCollectionContents: boolean; dataTableConfig: DataTableConfig; }; export type LocalStorageLocationBasedTypeMap = { shippingTestOrder: any; shippingTestAddress: any; }; /** * Wrapper around the browser's LocalStorage / SessionStorage object, for persisting data to the browser. */ export declare class LocalStorageService { private location; private adminId; constructor(location: Location); setAdminId(adminId?: string | null): void; /** * Set a key-value pair in the browser's LocalStorage */ set(key: K, value: LocalStorageTypeMap[K]): void; /** * Set a key-value pair specific to the current location (url) */ setForCurrentLocation(key: K, value: LocalStorageLocationBasedTypeMap[K]): void; /** * Set a key-value pair in the browser's SessionStorage */ setForSession(key: K, value: LocalStorageTypeMap[K]): void; /** * Get the value of the given key from the SessionStorage or LocalStorage. */ get(key: K): LocalStorageTypeMap[K] | null; /** * Get the value of the given key for the current location (url) */ getForCurrentLocation(key: K): LocalStorageLocationBasedTypeMap[K]; remove(key: keyof LocalStorageTypeMap): void; private getLocationBasedKey; private keyName; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }