import type { Duration } from "./Duration.js";
import type { Timeout } from "./Timeout.js";
/** Returns an array with the values of a numeric enum */
export declare function getNumericEnumValues<T extends Record<string, any>>(enumeration: T): readonly number[];
/** Takes an enumeration and an array of values of this enumeration and returns a states record to be used as metadata */
export declare function enumValuesToMetadataStates<T extends Record<string, any>>(enumeration: T, values?: readonly number[]): Record<number, string>;
export type ValueType = "number" | "boolean" | "string" | "number[]" | "boolean[]" | "string[]" | "duration" | "timeout" | "color" | "buffer" | "any";
/**
 * Defines options that can be provided when changing a value on a device via its value ID.
 * Each implementation will choose the options that are relevant for it, so the same options can be used everywhere.
 */
export interface ValueChangeOptions {
    /** A duration to be used for transitions like dimming lights or activating scenes. */
    transitionDuration: Duration | string;
    /** A volume level to be used for activating a Sound Switch CC. */
    volume: number;
}
export interface ValueMetadataAny {
    /** The type of the value */
    type: ValueType;
    /** The default value */
    default?: any;
    /** Whether the value can be read. By default all values are assumed readable */
    readable: boolean;
    /** Whether the value can be written. By default all values are assumed writeable */
    writeable: boolean;
    /** A description of the value */
    description?: string;
    /** A human-readable name for the property */
    label?: string;
    /** CC-specific information to help identify this value */
    ccSpecific?: Record<string, any>;
    /** Options that can be provided when changing this value on a device via its value ID. */
    valueChangeOptions?: readonly (keyof ValueChangeOptions)[];
    /** Whether this value represents a state (`true`) or a notification/event (`false`) */
    stateful?: boolean;
    /** Omit this value from value logs */
    secret?: boolean;
}
export type AllowedValue = {
    value: number;
} | {
    from: number;
    to: number;
    step?: number;
};
/** @deprecated Use {@link AllowedValue} instead. */
export type AllowedConfigValue = AllowedValue;
export interface ValueMetadataNumeric extends ValueMetadataAny {
    type: "number";
    /** The minimum value that can be assigned to a CC value (optional) */
    min?: number;
    /** The maximum value that can be assigned to a CC value (optional) */
    max?: number;
    /** When only certain values between min and max are allowed, this determines the step size */
    steps?: number;
    /** Defines the allowed values as a combination of single values and ranges. When present, min/max/steps are inferred from this for backwards compatibility. */
    allowed?: readonly AllowedValue[];
    /** The default value */
    default?: number;
    /** Speaking names for numeric values */
    states?: Record<number, string>;
    /**
     * Whether a user should be able to manually enter all legal values in the range `min...max` (`true`),
     * or if only the ones defined in `states` should be selectable in a dropdown (`false`).
     *
     * If missing, applications should assume this to be `true` if no `states` are defined and `false` if `states` are defined.
     */
    allowManualEntry?: boolean;
    /** An optional unit for numeric values */
    unit?: string;
}
export interface ValueMetadataBoolean extends ValueMetadataAny {
    type: "boolean";
    /** The default value */
    default?: number;
    /** Possible values and their meaning */
    states?: {
        true?: string;
        false?: string;
    };
}
export interface ValueMetadataString extends ValueMetadataAny {
    type: "string" | "color";
    /** The minimum length this string must have (optional) */
    minLength?: number;
    /** The maximum length this string may have (optional) */
    maxLength?: number;
    /** The default value */
    default?: string;
}
export interface ValueMetadataBuffer extends ValueMetadataAny {
    type: "buffer";
    /** The minimum length this buffer must have (optional) */
    minLength?: number;
    /** The maximum length this buffer may have (optional) */
    maxLength?: number;
}
export interface ValueMetadataDuration extends ValueMetadataAny {
    type: "duration";
    default?: Duration;
}
export interface ValueMetadataTimeout extends ValueMetadataAny {
    type: "timeout";
    default?: Timeout;
}
/**
 * Defines how a configuration value is encoded
 */
export declare enum ConfigValueFormat {
    SignedInteger = 0,
    UnsignedInteger = 1,
    Enumerated = 2,// UnsignedInt, Radio Buttons
    BitField = 3
}
/** @publicAPI */
export type ConfigValue = number;
export interface ConfigurationMetadata extends ValueMetadataNumeric {
    min?: ConfigValue;
    max?: ConfigValue;
    default?: ConfigValue;
    recommended?: ConfigValue;
    valueSize?: number;
    format?: ConfigValueFormat;
    isAdvanced?: boolean;
    requiresReInclusion?: boolean;
    isFromConfig?: boolean;
    destructive?: boolean;
    purpose?: string;
}
export type ValueMetadata = ValueMetadataAny | ValueMetadataNumeric | ValueMetadataBoolean | ValueMetadataString | ValueMetadataDuration | ValueMetadataBuffer | ConfigurationMetadata;
/** A collection of predefined CC value metadata */
export declare const ValueMetadata: {
    /** The default value for metadata: readable and writeable */
    Any: Readonly<{
        readonly type: "any";
        readonly readable: true;
        readonly writeable: true;
    }>;
    /** The default value for readonly metadata */
    ReadOnly: Readonly<{
        readonly type: "any";
        readonly readable: true;
        readonly writeable: false;
    }>;
    /** The default value for writeonly metadata */
    WriteOnly: Readonly<{
        readonly type: "any";
        readonly writeable: true;
        readonly readable: false;
    }>;
    /** A numeric value */
    Number: Readonly<{
        readonly readable: true;
        readonly writeable: true;
        readonly type: "number";
    }>;
    /** A numeric value (readonly) */
    ReadOnlyNumber: Readonly<{
        readonly readable: true;
        readonly writeable: false;
        readonly type: "number";
    }>;
    /** A numeric value (writeonly) */
    WriteOnlyNumber: Readonly<{
        readonly writeable: true;
        readonly readable: false;
        readonly type: "number";
    }>;
    /** Unsigned 8-bit integer */
    UInt8: Readonly<{
        readonly min: 0;
        readonly max: 255;
        readonly readable: true;
        readonly writeable: true;
        readonly type: "number";
    }>;
    /** Unsigned 16-bit integer */
    UInt16: Readonly<{
        readonly min: 0;
        readonly max: 65535;
        readonly readable: true;
        readonly writeable: true;
        readonly type: "number";
    }>;
    /** Unsigned 24-bit integer */
    UInt24: Readonly<{
        readonly min: 0;
        readonly max: 16777215;
        readonly readable: true;
        readonly writeable: true;
        readonly type: "number";
    }>;
    /** Unsigned 32-bit integer */
    UInt32: Readonly<{
        readonly min: 0;
        readonly max: 4294967295;
        readonly readable: true;
        readonly writeable: true;
        readonly type: "number";
    }>;
    /** Signed 8-bit integer */
    Int8: Readonly<{
        readonly min: -128;
        readonly max: 127;
        readonly readable: true;
        readonly writeable: true;
        readonly type: "number";
    }>;
    /** Signed 16-bit integer */
    Int16: Readonly<{
        readonly min: -32768;
        readonly max: 32767;
        readonly readable: true;
        readonly writeable: true;
        readonly type: "number";
    }>;
    /** Signed 24-bit integer */
    Int24: Readonly<{
        readonly min: -8388608;
        readonly max: 8388607;
        readonly readable: true;
        readonly writeable: true;
        readonly type: "number";
    }>;
    /** Signed 32-bit integer */
    Int32: Readonly<{
        readonly min: -2147483648;
        readonly max: 2147483647;
        readonly readable: true;
        readonly writeable: true;
        readonly type: "number";
    }>;
    /** Unsigned 8-bit integer (readonly) */
    ReadOnlyUInt8: Readonly<{
        readonly min: 0;
        readonly max: 255;
        readonly readable: true;
        readonly writeable: false;
        readonly type: "number";
    }>;
    /** Unsigned 16-bit integer (readonly) */
    ReadOnlyUInt16: Readonly<{
        readonly min: 0;
        readonly max: 65535;
        readonly readable: true;
        readonly writeable: false;
        readonly type: "number";
    }>;
    /** Unsigned 24-bit integer (readonly) */
    ReadOnlyUInt24: Readonly<{
        readonly min: 0;
        readonly max: 16777215;
        readonly readable: true;
        readonly writeable: false;
        readonly type: "number";
    }>;
    /** Unsigned 32-bit integer (readonly) */
    ReadOnlyUInt32: Readonly<{
        readonly min: 0;
        readonly max: 4294967295;
        readonly readable: true;
        readonly writeable: false;
        readonly type: "number";
    }>;
    /** Signed 8-bit integer (readonly) */
    ReadOnlyInt8: Readonly<{
        readonly min: -128;
        readonly max: 127;
        readonly readable: true;
        readonly writeable: false;
        readonly type: "number";
    }>;
    /** Signed 16-bit integer (readonly) */
    ReadOnlyInt16: Readonly<{
        readonly min: -32768;
        readonly max: 32767;
        readonly readable: true;
        readonly writeable: false;
        readonly type: "number";
    }>;
    /** Signed 24-bit integer (readonly) */
    ReadOnlyInt24: Readonly<{
        readonly min: -8388608;
        readonly max: 8388607;
        readonly readable: true;
        readonly writeable: false;
        readonly type: "number";
    }>;
    /** Signed 32-bit integer (readonly) */
    ReadOnlyInt32: Readonly<{
        readonly min: -2147483648;
        readonly max: 2147483647;
        readonly readable: true;
        readonly writeable: false;
        readonly type: "number";
    }>;
    /** Unsigned 8-bit integer (writeonly) */
    WriteOnlyUInt8: Readonly<{
        readonly min: 0;
        readonly max: 255;
        readonly writeable: true;
        readonly readable: false;
        readonly type: "number";
    }>;
    /** Unsigned 16-bit integer (writeonly) */
    WriteOnlyUInt16: Readonly<{
        readonly min: 0;
        readonly max: 65535;
        readonly writeable: true;
        readonly readable: false;
        readonly type: "number";
    }>;
    /** Unsigned 24-bit integer (writeonly) */
    WriteOnlyUInt24: Readonly<{
        readonly min: 0;
        readonly max: 16777215;
        readonly writeable: true;
        readonly readable: false;
        readonly type: "number";
    }>;
    /** Unsigned 32-bit integer (writeonly) */
    WriteOnlyUInt32: Readonly<{
        readonly min: 0;
        readonly max: 4294967295;
        readonly writeable: true;
        readonly readable: false;
        readonly type: "number";
    }>;
    /** Signed 8-bit integer (writeonly) */
    WriteOnlyInt8: Readonly<{
        readonly min: -128;
        readonly max: 127;
        readonly writeable: true;
        readonly readable: false;
        readonly type: "number";
    }>;
    /** Signed 16-bit integer (writeonly) */
    WriteOnlyInt16: Readonly<{
        readonly min: -32768;
        readonly max: 32767;
        readonly writeable: true;
        readonly readable: false;
        readonly type: "number";
    }>;
    /** Signed 24-bit integer (writeonly) */
    WriteOnlyInt24: Readonly<{
        readonly min: -8388608;
        readonly max: 8388607;
        readonly writeable: true;
        readonly readable: false;
        readonly type: "number";
    }>;
    /** Signed 32-bit integer (writeonly) */
    WriteOnlyInt32: Readonly<{
        readonly min: -2147483648;
        readonly max: 2147483647;
        readonly writeable: true;
        readonly readable: false;
        readonly type: "number";
    }>;
    /** The level of a Switch (0-99) */
    Level: Readonly<{
        readonly min: 0;
        readonly readable: true;
        readonly writeable: true;
        readonly type: "number";
        readonly max: 99;
    }>;
    /** The level of a Switch (0-99, readonly) */
    ReadOnlyLevel: Readonly<{
        readonly min: 0;
        readonly readable: true;
        readonly writeable: false;
        readonly type: "number";
        readonly max: 99;
    }>;
    /** The level of a Switch (0-99, writeonly) */
    WriteOnlyLevel: Readonly<{
        readonly min: 0;
        readonly writeable: true;
        readonly readable: false;
        readonly type: "number";
        readonly max: 99;
    }>;
    /** A boolean value */
    Boolean: Readonly<{
        readonly readable: true;
        readonly writeable: true;
        readonly type: "boolean";
    }>;
    /** A boolean value (readonly) */
    ReadOnlyBoolean: Readonly<{
        readonly readable: true;
        readonly writeable: false;
        readonly type: "boolean";
    }>;
    /** A boolean value (writeonly) */
    WriteOnlyBoolean: Readonly<{
        readonly writeable: true;
        readonly readable: false;
        readonly type: "boolean";
    }>;
    /** A string */
    String: Readonly<{
        readonly readable: true;
        readonly writeable: true;
        readonly type: "string";
    }>;
    /** A string (readonly) */
    ReadOnlyString: Readonly<{
        readonly readable: true;
        readonly writeable: false;
        readonly type: "string";
    }>;
    /** A string (writeonly) */
    WriteOnlyString: Readonly<{
        readonly writeable: true;
        readonly readable: false;
        readonly type: "string";
    }>;
    /** A (hex) string that represents a color */
    Color: Readonly<{
        readonly readable: true;
        readonly writeable: true;
        readonly type: "color";
    }>;
    /** A (hex) string that represents a color (readonly) */
    ReadOnlyColor: Readonly<{
        readonly readable: true;
        readonly writeable: false;
        readonly type: "color";
    }>;
    /** A (hex) string that represents a color (writeonly) */
    WriteOnlyColor: Readonly<{
        readonly writeable: true;
        readonly readable: false;
        readonly type: "color";
    }>;
    /** A duration value */
    Duration: Readonly<{
        readonly readable: true;
        readonly writeable: true;
        readonly type: "duration";
    }>;
    /** A duration value (readonly) */
    ReadOnlyDuration: Readonly<{
        readonly readable: true;
        readonly writeable: false;
        readonly type: "duration";
    }>;
    /** A duration value (writeonly) */
    WriteOnlyDuration: Readonly<{
        readonly writeable: true;
        readonly readable: false;
        readonly type: "duration";
    }>;
    /** A timeout value */
    Timeout: Readonly<{
        readonly readable: true;
        readonly writeable: true;
        readonly type: "timeout";
    }>;
    /** A timeout value (readonly) */
    ReadOnlyTimeout: Readonly<{
        readonly readable: true;
        readonly writeable: false;
        readonly type: "timeout";
    }>;
    /** A timeout value (writeonly) */
    WriteOnlyTimeout: Readonly<{
        readonly writeable: true;
        readonly readable: false;
        readonly type: "timeout";
    }>;
    /** A buffer */
    Buffer: Readonly<{
        readonly readable: true;
        readonly writeable: true;
        readonly type: "buffer";
    }>;
    /** A buffer (readonly) */
    ReadOnlyBuffer: Readonly<{
        readonly readable: true;
        readonly writeable: false;
        readonly type: "buffer";
    }>;
    /** A buffer (writeonly) */
    WriteOnlyBuffer: Readonly<{
        writeable: true;
        readable: false;
        type: "buffer";
    }>;
};
/**
 * Checks if a value is allowed by the given entries.
 */
export declare function isValueAllowed(value: number, entries: readonly AllowedValue[]): boolean;
/**
 * Computes the min, max, and (if possible) steps values from parsed allowed entries.
 */
export declare function inferMinMaxStepsFromAllowed(entries: readonly AllowedValue[]): {
    min: number;
    max: number;
    steps?: number;
} | undefined;
//# sourceMappingURL=Metadata.d.ts.map