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 AnnotativeKnobString extends LitElement {
    constructor() {
        super(...arguments);
        this.type = 'string';
        this.popupStyle = DEFAULT_POPUP_STYLE;
        this.value = 0;
        this.onChange = () => { };
    }
    render() {
        return html `<input
      type=${this.type === 'color' ? 'color' : 'text'}
      style=${styleMap({
            color: this.popupStyle.textColor,
            border: `1px solid ${this.popupStyle.inputBorderColor}`,
            'min-width': '200px',
        })}
      .value=${this.value}
      @change=${this.onChange}
    />`;
    }
}
AnnotativeKnobString.styles = [inputStyle];
__decorate([
    property({ attribute: 'type' })
], AnnotativeKnobString.prototype, "type", void 0);
__decorate([
    property({ attribute: 'popupStyle' })
], AnnotativeKnobString.prototype, "popupStyle", void 0);
__decorate([
    property({ attribute: 'value' })
], AnnotativeKnobString.prototype, "value", void 0);
__decorate([
    property({ attribute: 'onChange' })
], AnnotativeKnobString.prototype, "onChange", void 0);
customElements.get('annotative-code-knob-string') ||
    customElements.define('annotative-code-knob-string', AnnotativeKnobString);
//# sourceMappingURL=string.js.map