/*!
 * KoliBri - The accessible HTML-Standard
 */
import { h, Host } from "@stencil/core";
import { BaseWebComponent } from "../../internal/functional-components/base-web-component";
import { ProgressFC } from "../../internal/functional-components/progress/component";
import { ProgressController } from "../../internal/functional-components/progress/controller";
export class KolProgress extends BaseWebComponent {
    constructor() {
        this.ctrl = new ProgressController(this.stateAccess);
        this.liveValue = 0;
        super();
    }
    watchLabel(value) {
        this.ctrl.watchLabel(value);
    }
    watchMax(value) {
        this.ctrl.watchMax(value);
    }
    watchUnit(value) {
        this.ctrl.watchUnit(value);
    }
    watchValue(value) {
        this.ctrl.watchValue(value);
    }
    watchVariant(value) {
        this.ctrl.watchVariant(value);
    }
    componentWillLoad() {
        this.ctrl.componentWillLoad({
            label: this._label,
            max: this._max,
            unit: this._unit,
            value: this._value,
            variant: this._variant,
        });
    }
    disconnectedCallback() {
        this.ctrl.destroy();
    }
    render() {
        return (h(Host, { key: '875e3cb3b7b18f3a73be1115a577e7681e7f2c6d' }, h(ProgressFC, { key: '89fc086cc42ec754a47faf0ee6ba99800aac90dd', label: this.ctrl.getRenderProp('label'), max: this.ctrl.getRenderProp('max'), unit: this.ctrl.getRenderProp('unit'), value: this.ctrl.getRenderProp('value'), variant: this.ctrl.getRenderProp('variant'), liveValue: this.liveValue })));
    }
    static get is() { return "kol-progress"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "default": ["./style.scss"]
        };
    }
    static get styleUrls() {
        return {
            "default": ["style.css"]
        };
    }
    static get properties() {
        return {
            "_label": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string | undefined",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.)."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "_label"
            },
            "_max": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Defines the maximum value of the element."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "_max"
            },
            "_unit": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string | undefined",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Defines the unit of the step values (not shown)."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "_unit"
            },
            "_value": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Defines the value of the element."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "_value"
            },
            "_variant": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "ProgressVariantType",
                    "resolved": "\"bar\" | \"cycle\" | undefined",
                    "references": {
                        "ProgressVariantType": {
                            "location": "import",
                            "path": "../../internal/props",
                            "id": "src/internal/props/index.ts::ProgressVariantType"
                        }
                    }
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Defines which variant should be used for presentation."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "_variant"
            }
        };
    }
    static get states() {
        return {
            "liveValue": {}
        };
    }
    static get watchers() {
        return [{
                "propName": "_label",
                "methodName": "watchLabel"
            }, {
                "propName": "_max",
                "methodName": "watchMax"
            }, {
                "propName": "_unit",
                "methodName": "watchUnit"
            }, {
                "propName": "_value",
                "methodName": "watchValue"
            }, {
                "propName": "_variant",
                "methodName": "watchVariant"
            }];
    }
}
//# sourceMappingURL=component.js.map
