'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 bsSelectCss = "bs-select{}bs-select :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-select :where([data-required]){color:var(--bs-ink-red)}bs-select :where(label[data-disabled],[data-disabled] [data-required],[data-disabled] label){--label-color:var(--bs-ink-disabled)}bs-select :where([data-required]){color:var(--bs-ink-red);font-weight:var(--bs-font-bold, 600)}bs-select :where([data-disabled],[data-disabled] [data-required]){color:var(--bs-gray-400)}bs-select :where(.box) :is(input,textarea,select):where(:focus-visible){--offset-color:var(--bs-bg-medium)}bs-select :where(.box[data-invert]) :is(input,textarea,select):where(:focus-visible){--offset-color:var(--bs-bg-invert-base)}bs-select :is(input,select,textarea):where([data-error]){--input-border:var(--bs-ink-red)}bs-select :where(fieldset){border:none;margin-left:0;margin-right:0;padding:0}bs-select :where(fieldset legend){margin-bottom:0.25rem;padding:0}bs-select :where(label+input,label>input):where(:not([type=\"checkbox\"],[type=\"radio\"])),bs-select :where(label+textarea,label>textarea),bs-select :where(label+select,label>select){margin-top:0.25rem}bs-select input:where(:not([type=\"checkbox\"],[type=\"radio\"],[type=\"file\"],[type=\"range\"])),bs-select textarea,bs-select select{--input-bg:var(--bs-bg-base);--input-border:var(--bs-violet-medium);appearance:none;background-color:var(--input-bg);border-color:var(--input-border);border-radius:0.25rem;border-style:solid;border-width:var(--input-border-width, 1px);caret-color:var(--bs-blue-base);color:var(--bs-ink-base);font-size:var(--bs-text-base);font-weight:400;height:2.5rem;line-height:var(--bs-leading-base);min-height:2.5rem;padding-inline:0.75rem;width:100%}bs-select input:where([type=\"text\"],[type=\"email\"],[type=\"url\"]),bs-select select{text-overflow:ellipsis}bs-select textarea{height:auto;padding-block:0.5rem;resize:vertical}bs-select :is(input,textarea,select)::placeholder{color:var(--bs-violet-lightest)}bs-select :is(input,textarea,select):where(:focus-visible)::placeholder{opacity:0}bs-select :is(input:where(:not([type=\"checkbox\"],[type=\"radio\"])),textarea,select):where(:focus-visible){--input-border:var(--bs-blue-base);outline-width:0px}bs-select :is(input:where(:not([type=\"checkbox\"],[type=\"radio\"])),textarea,select):where(:disabled){--input-border:var(--bs-ink-disabled);--input-bg:var(--bs-bg-disabled);color:var(--bs-ink-disabled)}bs-select :is(input,select,textarea):where([data-error]){--input-border:var(--bs-ink-red)}bs-select :has(>textarea:only-child){display:block;line-height:0}bs-select :where(select:disabled){opacity:1}bs-select :is(input,textarea,select):disabled::placeholder,bs-select :is(input,textarea,select)[disabled]::placeholder{color:var(--bs-ink-disabled);opacity:1}bs-select select{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%230A0B19' d='M8.048 13.375a.745.745 0 0 1-.526-.217L0 5.686l1.053-1.061 6.995 6.95 6.897-6.85 1.053 1.06-7.423 7.373a.745.745 0 0 1-.527.217Z'/%3E%3C/svg%3E\");background-position:right 0.75rem center;background-repeat:no-repeat;background-size:1em 1em;padding-right:var(--bs-space-9)}bs-select .dark select{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23ffffff' d='M8.048 13.375a.745.745 0 0 1-.526-.217L0 5.686l1.053-1.061 6.995 6.95 6.897-6.85 1.053 1.06-7.423 7.373a.745.745 0 0 1-.527.217Z'/%3E%3C/svg%3E\")}bs-select .dark select:disabled{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23555775' d='M8.048 13.375a.745.745 0 0 1-.526-.217L0 5.686l1.053-1.061 6.995 6.95 6.897-6.85 1.053 1.06-7.423 7.373a.745.745 0 0 1-.527.217Z'/%3E%3C/svg%3E\")}:where(bs-select){display:inline-block;width:100%}";

const BsSelect = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    /** Native attributes to pass through to the <select>. */
    this.attrs = {};
    this.disabled = false;
    this.inputId = undefined;
    this.required = undefined;
    this.error = undefined;
    this.hintId = undefined;
    this.value = undefined;
    this.passAttrs = '';
  }
  get aria() {
    return { [this.error ? 'aria-errormessage' : 'aria-describedby']: this.hintId };
  }
  componentWillLoad() {
    this.attrs = index$1.getHostAttrs(this.hostEl, [
      'autocomplete',
      'multiple',
      'id',
      'name',
      'size',
      ...this.passAttrs.split(',')
    ]);
  }
  render() {
    return (index.h(index.Host, null, index.h("select", Object.assign({ id: this.inputId, class: "bs-select", "data-slot": true, disabled: this.disabled, required: this.required, "data-error": this.error }, Object.assign(Object.assign({}, this.attrs), this.aria)), index.h("slot", null))));
  }
  get hostEl() { return index.getElement(this); }
};
BsSelect.style = bsSelectCss;

exports.bs_select = BsSelect;

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