import { Host, h } from "@stencil/core";
export class CpslProgressIndicator {
    constructor() {
        this.totalSteps = undefined;
        this.step = undefined;
    }
    render() {
        const steps = new Array(this.totalSteps).fill(0).map((_, i) => {
            let resp = { active: false, previous: false };
            if (i === this.step) {
                resp.active = true;
            }
            else if (i < this.step) {
                resp.previous = true;
            }
            return resp;
        });
        return (h(Host, null, steps.map(step => (h("div", { class: { step: true, active: step.active, previous: step.previous } })))));
    }
    static get is() { return "cpsl-progress-indicator"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["cpsl-progress-indicator.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["cpsl-progress-indicator.css"]
        };
    }
    static get properties() {
        return {
            "totalSteps": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Total number of steps."
                },
                "attribute": "total-steps",
                "reflect": false
            },
            "step": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Current zero based step."
                },
                "attribute": "step",
                "reflect": false
            }
        };
    }
}
//# sourceMappingURL=cpsl-progress-indicator.js.map
