import { SegmentEvent } from '../events';
export declare type ID = string | null | undefined;
export interface UserOptions {
    localStorageFallbackDisabled?: boolean;
    persist?: boolean;
    cookie?: {
        key?: string;
        oldKey?: string;
    };
    localStorage?: {
        key: string;
    };
}
declare class Store {
    private cache;
    get<T>(key: string): T | null;
    set<T>(key: string, value: T | null): T | null;
    remove(key: string): void;
}
export declare class Cookie extends Store {
    static available(): boolean;
    static defaults: CookieOptions;
    private options;
    constructor(options?: CookieOptions);
    private opts;
    get<T>(key: string): T | null;
    set<T>(key: string, value: T): T | null;
    remove(key: string): void;
}
export declare class LocalStorage extends Store {
    static available(): boolean;
    get<T>(key: string): T | null;
    set<T>(key: string, value: T): T | null;
    remove(key: string): void;
}
export interface CookieOptions {
    maxage?: number;
    domain?: string;
    path?: string;
    secure?: boolean;
    sameSite?: string;
}
export declare class User {
    static defaults: {
        persist: boolean;
        cookie: {
            key: string;
            oldKey: string;
        };
        localStorage: {
            key: string;
        };
    };
    private cookies;
    private localStorage;
    private mem;
    private idKey;
    private traitsKey;
    private anonKey;
    options: UserOptions;
    constructor(options?: UserOptions, cookieOptions?: CookieOptions);
    private chainGet;
    private trySet;
    private chainClear;
    id: (id?: ID) => ID;
    private legacySIO;
    anonymousId: (id?: ID) => ID;
    traits: (traits?: object | null | undefined) => SegmentEvent['traits'];
    identify(id?: ID, traits?: object): void;
    logout(): void;
    reset(): void;
    load(): User;
    save(): boolean;
}
export declare class Group extends User {
    constructor(options?: UserOptions, cookie?: CookieOptions);
    anonymousId: (_id?: ID) => ID;
}
export {};
