'use strict';

var index = require('./index-BEF5cZxd.js');
var constants = require('./constants-357ehBFU.js');
require('./utils-NnC78QR3.js');
require('./sizes-D5zsw2g5.js');

const GovFormLabel = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.govClick = index.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 (index.h(index.Host, { key: 'ed4ec902f11631d324119863462a67305d8586e5', class: constants.FormLabelClass.root, size: this.size }, index.h(Tag, { key: '04168b854261d7aca3c96ee0bd77ab8c2fc9d5f2', class: constants.FormLabelClass.label, htmlFor: this.identifier, onClick: () => this.govClick.emit() }, index.h("slot", { key: '3d9fadd9d60baae633a699db046ca46605c4ab4c' }), this.required ? index.h("span", { class: "gov-color--text-status-error" }, "\u00A0*") : null)));
    }
};

exports.gov_form_label = GovFormLabel;
//# sourceMappingURL=gov-form-label.entry.cjs.js.map

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