import * as i0 from '@angular/core'; interface StorageAttributes { expires?: Date | number; } interface CookieStorageAttributes extends StorageAttributes { domain?: string; path?: string; secure?: boolean; sameSite?: 'None' | 'Lax' | 'Strict'; } interface PolyfillStorageAttributes extends StorageAttributes { } interface MemoryStorageAttributes extends StorageAttributes { } interface StorageStrategy { get(token: string): T | undefined; set(token: string, value: T): void; set(token: string, value: T, attributes?: StorageAttributes): void; remove(token: string): void; remove(token: string, attributes?: StorageAttributes): void; clear(): void; clear(attributes?: StorageAttributes): void; isSupported(): boolean; } declare enum StorageOption { Local = "local", Cookie = "cookie", Session = "session", Memory = "memory" } interface MemoryStorageData { [token: string]: MemoryStorageItem; } interface MemoryStorageItem { value: any; expires?: Date; } declare class PolyfillStorage implements StorageStrategy { private _storage?; private readonly _isSupported; constructor(_storage?: Storage); get(token: string): T; set(token: string, value: T, attributes?: PolyfillStorageAttributes): void; remove(token: string): void; clear(): void; isSupported(): boolean; private decode; private encode; private testIfSupported; } declare class CookieStorage implements StorageStrategy { private _isBrowser; private _cookieString?; private readonly _isSupported; constructor(_isBrowser: boolean, _cookieString?: string); get(token: string): T; set(token: string, value: T, attributes?: CookieStorageAttributes): void; remove(token: string, attributes?: CookieStorageAttributes): void; clear(attributes?: CookieStorageAttributes): void; isSupported(): boolean; private all; private encode; private decode; private jsonParse; private stringifyCookie; private stringifyAttribute; private testIfSupported; } declare class MemoryStorage implements StorageStrategy { private _storage; get(token: string): T; set(token: string, value: T, attributes?: MemoryStorageAttributes): void; remove(token: string): void; clear(): void; isSupported(): boolean; private encode; } declare class Storage$1 implements StorageStrategy { private readonly _platform; private readonly _cookieString?; private readonly _strategies; private readonly _current; constructor(); select(option: StorageOption | StorageOption[]): StorageStrategy; get local(): StorageStrategy; get cookie(): StorageStrategy; get session(): StorageStrategy; get memory(): StorageStrategy; get(token: string): T; set(token: string, value: T, attributes?: StorageAttributes): void; remove(token: string, attributes?: StorageAttributes): void; clear(attributes?: StorageAttributes): void; isSupported(): boolean; private findBestStorageStrategy; private getLocalStorage; private getSessionStorage; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export { CookieStorage, MemoryStorage, PolyfillStorage, Storage$1 as Storage, StorageOption }; export type { CookieStorageAttributes, MemoryStorageAttributes, MemoryStorageData, MemoryStorageItem, PolyfillStorageAttributes, StorageAttributes, StorageStrategy };