'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index$1 = require('./index-457520a1.js');
const elementQuestionBase = require('./element-question-base-a6f39464.js');

const ElementMatrixEditor = class {
    constructor(hostRef) {
        index$1.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'
            }
        };
    }
    prop(path, options = {}) {
        return this.handler.prop(path, Object.assign(Object.assign({}, options), { label: this.label }));
    }
    render() {
        const { labelOrientationH, labelOrientationV } = this.label;
        return (index$1.h(elementQuestionBase.ElementQuestionBase, { question: this.prop('question', { localize: true }), required: this.prop('required') }, index$1.h("div", { class: "option-creator" }, index$1.h("bce-option-creator", Object.assign({}, this.prop('rows', { default: () => [], localize: true }), { label: this.label.rows })), index$1.h("bce-option-creator", Object.assign({}, this.prop('columns', { default: () => [], localize: true }), { label: this.label.columns }))), index$1.h("bce-select", Object.assign({}, this.prop('orientation'), { type: "radio" }), index$1.h("bce-option", { value: "horizontal" }, labelOrientationH), index$1.h("bce-option", { value: "vertical" }, labelOrientationV)), index$1.h("slot", null)));
    }
    static get style() { 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}}"; }
};

exports.bce_element_matrix_editor = ElementMatrixEditor;
