'use strict';

var index = require('./index-BEF5cZxd.js');
var props = require('./props-CPENhBnM.js');
var constants = require('./constants-CYm8AK_D.js');
var template = require('./template-Cj6PcLmR.js');
require('./gov.log-C5EH15b_.js');
require('./utils-NnC78QR3.js');
require('./colors-DgrrxjsX.js');
require('./sizes-D5zsw2g5.js');

const GovStepper = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.govChange = index.createEvent(this, "gov-change");
        this.hydrated = false;
        /**
         * Size of stepper
         */
        this.size = 'm';
        this.h = template.govHost(this.host);
    }
    validateSize(newValue) {
        props.validateProp(constants.StepperSizes, newValue, constants.StepperClass.root);
    }
    componentWillLoad() {
        this.validateSize(this.size);
    }
    componentDidLoad() {
        this.host.querySelectorAll(constants.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 (index.h(index.Host, { key: '92d3349a28b4330a3bea5293853612d0a0b96069', class: this.h.classes(constants.StepperClass.root), role: "list", size: this.size, hydrated: this.hydrated }, index.h("slot", { key: 'a5b65c3a06c63f826d6c968c69f1452abe0408af' })));
    }
    get host() { return index.getElement(this); }
    static get watchers() { return {
        "size": ["validateSize"]
    }; }
};

exports.gov_stepper = GovStepper;
//# sourceMappingURL=gov-stepper.entry.cjs.js.map

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