import { r as registerInstance, h } from './index-b13326fc.js';
import { E as ElementQuestionBase } from './element-question-base-275076e1.js';

const ElementRadioEditor = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.handleOther = (event) => {
            const target = event.target;
            this.handler.set('options', target.value, { localize: true });
            this.handler.set('other', event.detail, { emit: true, localize: true });
        };
    }
    prop(path, options = {}) {
        return this.handler.prop(path, Object.assign({}, options));
    }
    render() {
        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: () => [], 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)));
    }
};

export { ElementRadioEditor as bce_element_radio_editor };
