import { r as registerInstance, h, g as getElement } from './core-095fd691.js';
var BceElementInput = /** @class */ (function () {
    function class_1(hostRef) {
        var _this = this;
        registerInstance(this, hostRef);
        this.handleInput = function (event) {
            event.cancelBubble = true;
            var target = event.target;
            _this.value = target.value;
            _this.el.dispatchEvent(new Event('input', { bubbles: true }));
        };
    }
    class_1.prototype.render = function () {
        if (!this.template)
            return null;
        var type = this.template.multiline ? 'textarea' : 'text';
        return [
            h("p", null, this.template.question),
            h("bce-input", { onInput: this.handleInput, validation: this.template.required ? 'required' : '', type: type })
        ];
    };
    Object.defineProperty(class_1.prototype, "el", {
        get: function () { return getElement(this); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(class_1, "style", {
        get: function () { return "bce-element-input p{font-weight:500;text-align:center}\@media screen and (min-width:1024px){bce-element-input p{text-align:left}}"; },
        enumerable: true,
        configurable: true
    });
    return class_1;
}());
export { BceElementInput as bce_element_input };
