/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { Diagnostic } from "../log/Diagnostic.js";
import type { Environment } from "./Environment.js";
import { Environmental } from "./Environmental.js";
/**
 * Environmental configuration values.
 */
export declare class VariableService {
    #private;
    [Diagnostic.value]: string;
    constructor(environment: Environment);
    static [Environmental.create](environment: Environment): VariableService;
    get vars(): VariableService.Map;
    /**
     * Configure a component.
     *
     * Runs the supplied {@link configurator} immediately and whenever variables reference by the {@link configurator}
     * change.
     *
     * To terminate reconfiguration invoke {@link VariableService.Usage.close} on the return value.
     */
    use(configurator: () => void): VariableService.Usage;
    get<T extends VariableService.Primitive>(name: string, fallback?: T): T;
    get<T extends VariableService.Value>(name: string, fallback: T): T;
    get<T extends VariableService.Value>(name: string): T | undefined;
    has(name: string): boolean;
    set(name: string, value: VariableService.Value): void;
    persist(name: string, value: VariableService.Value): Promise<void>;
    persistConfigValue?: (name: string, value: VariableService.Value) => Promise<void>;
    string(name: string): string;
    boolean(name: string): boolean;
    number(name: string): number | undefined;
    integer(name: string, fallback?: number): number | undefined;
    increment(name: string): number;
    addConfigStyle(vars: VariableService.Map): void;
    addUnixEnvStyle(vars: Record<string, string | undefined>): void;
    addArgvStyle(vars: string[]): void;
}
export declare namespace VariableService {
    interface Options {
        unixEnvStyle?: Record<string, string>;
        argvStyle?: string[];
        configStyle?: Map;
    }
    interface Map extends Record<string, Value> {
    }
    type List = Value[];
    type Primitive = number | string | boolean;
    type Value = Primitive | Map | List;
    interface Usage {
        variables: Set<string>;
        configurator(): void;
        close(): void;
    }
}
//# sourceMappingURL=VariableService.d.ts.map