import { r as registerInstance, h } from './index-b13326fc.js';
import { E as ElementQuestionBase } from './element-question-base-275076e1.js';
var ElementRadioEditor = /** @class */ (function () {
    function ElementRadioEditor(hostRef) {
        var _this = this;
        registerInstance(this, hostRef);
        this.handleOther = function (event) {
            var target = event.target;
            _this.handler.set('options', target.value, { localize: true });
            _this.handler.set('other', event.detail, { emit: true, localize: true });
        };
    }
    ElementRadioEditor.prototype.prop = function (path, options) {
        if (options === void 0) { options = {}; }
        return this.handler.prop(path, Object.assign({}, options));
    };
    ElementRadioEditor.prototype.render = function () {
        return (h(ElementQuestionBase, { t: this.t, question: this.prop('question', { localize: true }), required: this.prop('required') }, h("bce-option-creator", Object.assign({}, this.prop('options', { default: function () { return []; }, localize: true }), { "allow-other": true, label: this.t('me-option'), other: this.handler.tryGet('other', { localize: true }), placeholder: this.t('me-option'), t: this.t, onOther: this.handleOther })), h("bce-select", Object.assign({}, this.prop('orientation'), { label: this.t('me-orientation'), type: "radio" }), h("bce-option", { value: "horizontal" }, this.t('me-orientation-h')), h("bce-option", { value: "vertical" }, this.t('me-orientation-v'))), h("slot", null)));
    };
    return ElementRadioEditor;
}());
export { ElementRadioEditor as bce_element_radio_editor };
