export interface IPreference<T> {
    /**
     * The current value of the preference.
     */
    value: T | null | undefined;
    /**
     * The value that will be effectively used by the Configurable object if preferences are submitted as they are.
     */
    effectiveValue: T | null | undefined;
    /**
     * Indicates if this preference will be effectively used by the Configurable object if preferences are submitted as they are.
     */
    isEffective: boolean;
    /**
     * Unset the preference.
     * Equivalent to set(null).
     */
    clear(): void;
}
export interface IBooleanPreference extends IPreference<boolean> {
    /**
     * Toggle the preference to its opposite value.
     */
    toggle(): void;
}
export interface IEnumPreference<T> extends IPreference<T> {
    /**
     * The possible values for this preference.
     */
    supportedValues: T[];
}
export interface IRangePreference<T> extends IPreference<T> {
    /**
     * The supported range [min, max] for this preference.
     */
    supportedRange: [T, T];
    /**
     * The step value for the incrementing/decrementing into the range.
     */
    step: number;
    /**
     * Increase the preference value.
     */
    increment(): void;
    /**
     * Decrease the preference value.
     */
    decrement(): void;
    /**
     * Format the preference value as a string.
     */
    format(value: T): string;
}
export declare class Preference<T> implements Preference<T> {
    protected _value?: T | null;
    protected readonly _effectiveValue?: T | null;
    protected readonly _isEffective: boolean;
    protected _onChange: (newValue: T | null | undefined) => void;
    constructor({ initialValue, effectiveValue, isEffective, onChange }: {
        initialValue?: T | null;
        effectiveValue?: T | null;
        isEffective: boolean;
        onChange: (newValue: T | null | undefined) => void;
    });
    set value(value: T | null | undefined);
    get value(): T | null | undefined;
    get effectiveValue(): T | null | undefined;
    get isEffective(): boolean;
    clear(): void;
}
export declare class BooleanPreference extends Preference<boolean> implements IBooleanPreference {
    set value(value: boolean | null | undefined);
    get value(): boolean | null | undefined;
    get effectiveValue(): boolean | null | undefined;
    get isEffective(): boolean;
    clear(): void;
    toggle(): void;
}
export declare class EnumPreference<T extends string | number | symbol> extends Preference<T> implements IEnumPreference<T> {
    private readonly _supportedValues;
    constructor({ initialValue, effectiveValue, isEffective, onChange, supportedValues }: {
        initialValue?: T | null;
        effectiveValue?: T | null;
        isEffective: boolean;
        onChange: (newValue: T | null | undefined) => void;
        supportedValues: T[];
    });
    set value(value: T | null | undefined);
    get value(): T | null | undefined;
    get effectiveValue(): T | null | undefined;
    get isEffective(): boolean;
    get supportedValues(): T[];
    clear(): void;
}
export declare class RangePreference<T extends number> extends Preference<T> implements IRangePreference<T> {
    private readonly _supportedRange;
    private readonly _step;
    private readonly _decimals;
    constructor({ initialValue, effectiveValue, isEffective, onChange, supportedRange, step }: {
        initialValue?: T | null;
        effectiveValue?: T | null;
        isEffective: boolean;
        onChange: (newValue: T | null | undefined) => void;
        supportedRange: [T, T];
        step: number;
    });
    set value(value: T | null | undefined);
    get value(): T | null | undefined;
    get effectiveValue(): T | null | undefined;
    get isEffective(): boolean;
    get supportedRange(): [T, T];
    get step(): number;
    increment(): void;
    decrement(): void;
    format(value: T): string;
    clear(): void;
}
