import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-ClISz4NF.js';
import { v as validateProp } from './props-CJZgTDla.js';
import { S as StepperItemClass, a as StepperClass, b as StepperSizes } from './constants-oYp2tkdN.js';
import { g as govHost } from './template-CoD1xawt.js';
import './gov.log-BtqD9K8d.js';
import './utils-CQvUntGY.js';
import './colors-U40vKHrs.js';
import './sizes-BcQO4NH2.js';

const GovStepper = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.govChange = createEvent(this, "gov-change");
        this.hydrated = false;
        /**
         * Size of stepper
         */
        this.size = 'm';
        this.h = govHost(this.host);
    }
    validateSize(newValue) {
        validateProp(StepperSizes, newValue, StepperClass.root);
    }
    componentWillLoad() {
        this.validateSize(this.size);
    }
    componentDidLoad() {
        this.host.querySelectorAll(StepperItemClass.root).forEach((child) => {
            child.setAttribute('size', this.size);
            child.addEventListener('gov-change', (e) => {
                e.stopPropagation();
                this.govChange.emit(e.detail);
            });
        });
    }
    connectedCallback() {
        this.hydrated = true;
    }
    render() {
        return (h(Host, { key: '92d3349a28b4330a3bea5293853612d0a0b96069', class: this.h.classes(StepperClass.root), role: "list", size: this.size, hydrated: this.hydrated }, h("slot", { key: 'a5b65c3a06c63f826d6c968c69f1452abe0408af' })));
    }
    get host() { return getElement(this); }
    static get watchers() { return {
        "size": ["validateSize"]
    }; }
};

export { GovStepper as gov_stepper };
//# sourceMappingURL=gov-stepper.entry.js.map

//# sourceMappingURL=gov-stepper.entry.js.map