import { r as registerInstance, h } from './index-d0047af2.js';
import { E as ElementQuestionBase } from './element-question-base-5ebd9dee.js';
var ElementMatrixEditor = /** @class */ (function () {
    function ElementMatrixEditor(hostRef) {
        registerInstance(this, hostRef);
        this.label = {
            name: 'Matrix',
            labelQuestion: 'Formulate your question',
            labelRequired: 'Required',
            labelRows: 'Rows',
            labelColumns: 'Columns',
            labelOrientation: 'Column Oriëntation',
            labelOrientationH: 'Horizontal',
            labelOrientationV: 'Vertical',
            placeholderRows: 'Row',
            placeholderColumns: 'Column',
            rows: {
                labelOCOptionAdd: 'Add Row',
                labelOCOptionRemove: 'Delete Row'
            },
            columns: {
                labelOCOptionAdd: 'Add Row',
                labelOCOptionRemove: 'Delete Row'
            }
        };
    }
    ElementMatrixEditor.prototype.prop = function (path, options) {
        if (options === void 0) { options = {}; }
        return this.handler.prop(path, Object.assign(Object.assign({}, options), { label: this.label }));
    };
    ElementMatrixEditor.prototype.render = function () {
        var _a = this.label, labelOrientationH = _a.labelOrientationH, labelOrientationV = _a.labelOrientationV;
        return (h(ElementQuestionBase, { question: this.prop('question', { localize: true }), required: this.prop('required') }, h("div", { class: "option-creator" }, h("bce-option-creator", Object.assign({}, this.prop('rows', { default: function () { return []; }, localize: true }), { label: this.label.rows })), h("bce-option-creator", Object.assign({}, this.prop('columns', { default: function () { return []; }, localize: true }), { label: this.label.columns }))), h("bce-select", Object.assign({}, this.prop('orientation'), { type: "radio" }), h("bce-option", { value: "horizontal" }, labelOrientationH), h("bce-option", { value: "vertical" }, labelOrientationV)), h("slot", null)));
    };
    Object.defineProperty(ElementMatrixEditor, "style", {
        get: function () { return ":host bce-input,:host bce-switch{margin:10px 0}:host .option-creator{position:relative;display:-ms-flexbox;display:flex;-ms-flex-flow:column nowrap;flex-flow:column nowrap}:host .option-creator bce-option-creator{-ms-flex:1 1 auto;flex:1 1 auto}:host .option-creator bce-option-creator :last-child{bottom:-27px}\@media screen and (min-width: 600px){:host .option-creator{-ms-flex-align:start;align-items:flex-start;-ms-flex-flow:row nowrap;flex-flow:row nowrap}}"; },
        enumerable: true,
        configurable: true
    });
    return ElementMatrixEditor;
}());
export { ElementMatrixEditor as bce_element_matrix_editor };
