/**
 * @license
 * Copyright 2023 Tyler Technologies, Inc. 
 * License: Apache-2.0
 */
import { getShadowElement } from '@tylertech/forge-core';
import { MDCCircularProgress } from '@material/circular-progress';
import { CIRCULAR_PROGRESS_CONSTANTS } from './circular-progress-constants';
export class CircularProgressAdapter {
    constructor(_component) {
        this._component = _component;
        this._rootElement = getShadowElement(this._component, CIRCULAR_PROGRESS_CONSTANTS.selectors.ROOT);
    }
    initialize() {
        this._mdcCircularProgress = new MDCCircularProgress(this._rootElement);
    }
    destroy() {
        var _a;
        (_a = this._mdcCircularProgress) === null || _a === void 0 ? void 0 : _a.destroy();
    }
    setDeterminate(value) {
        if (this._mdcCircularProgress) {
            this._mdcCircularProgress.determinate = value;
        }
    }
    setProgress(value) {
        if (this._mdcCircularProgress) {
            this._mdcCircularProgress.progress = value;
        }
    }
    open() {
        var _a;
        (_a = this._mdcCircularProgress) === null || _a === void 0 ? void 0 : _a.open();
    }
    close() {
        var _a;
        (_a = this._mdcCircularProgress) === null || _a === void 0 ? void 0 : _a.close();
    }
    setAriaLabel(value) {
        this._rootElement.setAttribute('aria-label', value);
    }
}
