import * as i0 from '@angular/core';
import { InjectionToken } from '@angular/core';
import { BehaviorSubject, Observable } from 'rxjs';

interface SdStorageOption<T = any> {
    type?: 'session';
    default?: T;
    args?: Record<string, any>;
}
interface SdStorage<T = any> {
    get: () => T;
    set: (data: T) => void;
    setSilent: (data: T) => void;
    has: () => boolean;
    remove: () => void;
    subject: BehaviorSubject<T>;
    observer: Observable<T>;
}
interface ISdStorageConfiguration {
    key?: (key: string) => string;
}
declare const SD_STORAGE_CONFIG: InjectionToken<ISdStorageConfiguration>;

declare class SdStorageService {
    #private;
    private configuration;
    constructor(configuration: ISdStorageConfiguration);
    create<T = any>(key: string | object, option?: SdStorageOption<T>): SdStorage<T>;
    static ɵfac: i0.ɵɵFactoryDeclaration<SdStorageService, [{ optional: true; }]>;
    static ɵprov: i0.ɵɵInjectableDeclaration<SdStorageService>;
}

export { SD_STORAGE_CONFIG, SdStorageService };
export type { ISdStorageConfiguration, SdStorage, SdStorageOption };
