/**
 * @license
 * Copyright 2023 Tyler Technologies, Inc. 
 * License: Apache-2.0
 */
export class CircularProgressFoundation {
    constructor(_adapter) {
        this._adapter = _adapter;
        this._open = true;
        this._determinate = false;
        this._progress = 0;
    }
    initialize() {
        this._adapter.initialize();
        this._applyOpen();
        this._applyDeterminate();
        this._applyProgress();
    }
    disconnect() {
        this._adapter.destroy();
    }
    _applyOpen() {
        if (this._open) {
            this._adapter.open();
        }
        else {
            this._adapter.close();
        }
    }
    _applyDeterminate() {
        this._adapter.setDeterminate(this._determinate);
    }
    _applyProgress() {
        this._adapter.setProgress(this._progress);
    }
    get open() {
        return this._open;
    }
    set open(value) {
        if (this._open !== value) {
            this._open = value;
            this._applyOpen();
        }
    }
    get determinate() {
        return this._determinate;
    }
    set determinate(value) {
        if (this._determinate !== value) {
            this._determinate = value;
            this._applyDeterminate();
        }
    }
    get progress() {
        return this._progress;
    }
    set progress(value) {
        if (this._progress !== value) {
            this._progress = value;
            this._applyProgress();
        }
    }
    set ariaLabel(value) {
        this._adapter.setAriaLabel(value);
    }
}
