var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
// Lit
import { LitElement, html } from 'lit';
import { property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
// Default values
import { DEFAULT_POPUP_STYLE } from '../../constants/defaultValues.js';
// Components
import { inputStyle } from '../../styles/knobs/input.js';
export class AnnotativeKnobSelect extends LitElement {
    constructor() {
        super(...arguments);
        this.config = { options: [] };
        this.popupStyle = DEFAULT_POPUP_STYLE;
        this.value = 0;
        this.onChange = () => { };
    }
    render() {
        const options = this.config.options;
        if (!options || options.length === 0)
            return '';
        return html `
      <select
        @change=${this.onChange}
        .value=${this.value}
        style=${styleMap({
            color: this.popupStyle.textColor,
            border: `1px solid ${this.popupStyle.inputBorderColor}`,
            'min-width': '200px',
            appearance: 'none',
        })}
      >
        ${options.map((option) => html `<option>${option}</option>`)}
      </select>
    `;
    }
}
AnnotativeKnobSelect.styles = [inputStyle];
__decorate([
    property({ attribute: 'config' })
], AnnotativeKnobSelect.prototype, "config", void 0);
__decorate([
    property({ attribute: 'popupStyle' })
], AnnotativeKnobSelect.prototype, "popupStyle", void 0);
__decorate([
    property({ attribute: 'value' })
], AnnotativeKnobSelect.prototype, "value", void 0);
__decorate([
    property({ attribute: 'onChange' })
], AnnotativeKnobSelect.prototype, "onChange", void 0);
customElements.get('annotative-code-knob-select') ||
    customElements.define('annotative-code-knob-select', AnnotativeKnobSelect);
//# sourceMappingURL=select.js.map