'use strict';

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

const index = require('./index-0b1e2673.js');

const styleCss = ".sc-smoothly-select-h{display:block}[hidden].sc-smoothly-select-h{display:none}select.sc-smoothly-select{min-width:1.5em;padding-top:0.5em;border:none;-webkit-appearance:none;background-color:rgb(var(--smoothly-color));padding:.3em}select.sc-smoothly-select>option.sc-smoothly-select{background-color:inherit}select.sc-smoothly-select:focus{outline:none}";

const SmoothlySelect = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.selectionChanged = index.createEvent(this, "selectionChanged", 7);
  }
  optionSelected() {
    if (this.selectElement)
      this.selectionChanged.emit({ identifier: this.identifier, value: this.value = this.selectElement.value });
  }
  componentDidLoad() {
    var _a;
    if (this.selectElement)
      this.value = (_a = this.selectElement) === null || _a === void 0 ? void 0 : _a.value;
  }
  render() {
    return [
      index.h("select", { ref: e => (this.selectElement = e), id: this.identifier, onChange: () => this.optionSelected(), style: { background: this.background } }, index.h("slot", null)),
    ];
  }
};
SmoothlySelect.style = styleCss;

exports.smoothly_select = SmoothlySelect;
