import { r as registerInstance, c as createEvent, h, H as Host } from './index-ClISz4NF.js';
import { F as FormLabelClass } from './constants-CysDgoMA.js';
import './utils-CQvUntGY.js';
import './sizes-BcQO4NH2.js';

const GovFormLabel = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.govClick = createEvent(this, "gov-click");
        /**
         * Label's size.
         */
        this.size = 'm';
        /**
         * Set whether the input is required or not.
         */
        this.required = false;
        /**
         * Use label as a legend for better accessibility.
         * Note: Don't forget to set the fieldset attribute of the gov-form-control component
         */
        this.legend = false;
    }
    render() {
        const Tag = this.legend ? 'legend' : 'label';
        return (h(Host, { key: 'ed4ec902f11631d324119863462a67305d8586e5', class: FormLabelClass.root, size: this.size }, h(Tag, { key: '04168b854261d7aca3c96ee0bd77ab8c2fc9d5f2', class: FormLabelClass.label, htmlFor: this.identifier, onClick: () => this.govClick.emit() }, h("slot", { key: '3d9fadd9d60baae633a699db046ca46605c4ab4c' }), this.required ? h("span", { class: "gov-color--text-status-error" }, "\u00A0*") : null)));
    }
};

export { GovFormLabel as gov_form_label };
//# sourceMappingURL=gov-form-label.entry.js.map

//# sourceMappingURL=gov-form-label.entry.js.map