import { r as registerInstance, h, F as Fragment, H as Host, g as getElement } from './index-92f6d7ee.js';
import { a as getHostAttrs } from './index-7c9378a9.js';
import './v4-23648a96.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) {
    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 = getHostAttrs(this.hostEl, this.passAttrs.split(','));
  }
  render() {
    return (h(Host, { class: this.hide ? 'visually-hidden' : '' }, h("label", Object.assign({ "data-disabled": this.disabled, htmlFor: this.for }, this.attrs), h("span", { "data-slot": true }, h("slot", null)), this.required && (h(Fragment, null, h("span", { "data-required": true, "aria-hidden": "true" }, " *"), h("span", { class: "visually-hidden" }, "required"))))));
  }
  get hostEl() { return getElement(this); }
};
BsLabel.style = bsLabelCss;

export { BsLabel as bs_label };

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