'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-305226cb.js');
const index$1 = require('./index-f92a5850.js');
require('./v4-c23234d2.js');

const bsLabelCss = "bs-label{display:inline-block;width:100%}bs-label :where(label,legend){--label-color:var(--bs-ink-base);color:var(--label-color);display:inline-block;font-size:var(--bs-text-sm);font-weight:600;line-height:var(--bs-leading-base);width:100%}bs-label :where([data-required]){color:var(--bs-ink-red)}bs-label :where(label[data-disabled],[data-disabled] [data-required],[data-disabled] label){--label-color:var(--bs-ink-disabled)}.bs-boolean label,.bs-boolean bs-label{font-size:var(--bs-text-base);font-weight:400;line-height:1.5;width:auto}.bs-boolean bs-label label{padding-inline-end:0.5em}.bs-boolean input+bs-label label{padding-inline:0.5em 0}.bs-boolean[data-size=sm] bs-label,.bs-boolean[data-size=sm] bs-label label{font-size:var(--bs-text-xs);line-height:100%}";

const BsLabel = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    /** Native attributes to pass through to the input element. */
    this.attrs = {};
    this.disabled = undefined;
    this.for = undefined;
    this.hide = undefined;
    this.passAttrs = '';
    this.required = undefined;
  }
  componentWillLoad() {
    this.attrs = index$1.getHostAttrs(this.hostEl, this.passAttrs.split(','));
  }
  render() {
    return (index.h(index.Host, { class: this.hide ? 'visually-hidden' : '' }, index.h("label", Object.assign({ "data-disabled": this.disabled, htmlFor: this.for }, this.attrs), index.h("span", { "data-slot": true }, index.h("slot", null)), this.required && (index.h(index.Fragment, null, index.h("span", { "data-required": true, "aria-hidden": "true" }, " *"), index.h("span", { class: "visually-hidden" }, "required"))))));
  }
  get hostEl() { return index.getElement(this); }
};
BsLabel.style = bsLabelCss;

exports.bs_label = BsLabel;

//# sourceMappingURL=bs-label.cjs.entry.js.map