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 { W as WizardItemClass, a as WizardClass, b as WizardSizes } from './constants-YOtDGTm5.js';
import { g as govHost } from './template-CoD1xawt.js';
import { v as validateAccessibleLabel } from './wcag-CD6_13JO.js';
import { c as canValidateWcagOnRender } from './gov.log-BtqD9K8d.js';
import { d as delay } from './utils-CQvUntGY.js';
import './colors-U40vKHrs.js';
import './sizes-BcQO4NH2.js';
import './string.utils-vN03FcXN.js';
import './helpers.types-DNztiAH0.js';

const GovWizard = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.govChange = createEvent(this, "gov-change");
        this.hydrated = false;
        /**
         * Size of wizard
         */
        this.size = "m";
        this.h = govHost(this.host);
    }
    validateSize(newValue) {
        validateProp(WizardSizes, newValue, WizardClass.root);
    }
    componentWillLoad() {
        this.validateSize(this.size);
    }
    componentDidLoad() {
        this.host.querySelectorAll(WizardItemClass.root).forEach((child) => {
            child.setAttribute("size", this.size);
            /*
            child.addEventListener('gov-change', (e: GovWizardItemCustomEvent<GovWizardItemChangeEvent>) => {
                e.stopPropagation()
                this.govChange.emit(e.detail)
            })
            */
        });
    }
    async componentDidRender() {
        if (canValidateWcagOnRender()) {
            await delay(500);
            await this.validateWcag();
        }
    }
    connectedCallback() {
        this.hydrated = true;
    }
    render() {
        return (h(Host, { key: '0b400b9a4f82a9477e87a314eb54928b66038912', class: this.h.classes(WizardClass.root), role: "list", size: this.size, hydrated: this.hydrated }, h("slot", { key: '27f601048d97c94aca98594c98028209081b5690' })));
    }
    /**
     * Validate the WCAG attributes of the component
     */
    async validateWcag() {
        validateAccessibleLabel(this.wcagLabel, this.wcagLabelledBy, WizardClass.root);
    }
    get host() { return getElement(this); }
    static get watchers() { return {
        "size": ["validateSize"]
    }; }
};

export { GovWizard as gov_wizard };
//# sourceMappingURL=gov-wizard.entry.js.map

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