import { h } from "@stencil/core";
import { ElementQuestionBase } from '../../../utils/element-question-base';
export class BceElementTableTemplate {
    constructor() {
        this.label = {
            name: 'Table',
            labelQuestion: 'Formulate your question',
            labelRequired: 'Required',
            labelOCOptionAdd: 'Add Column',
            labelOCOptionRemove: 'Delete Column',
            labelOrientation: 'Oriëntation',
            labelOrientationH: 'Horizontal',
            labelOrientationV: 'Vertical',
            labelMaxRows: 'Max row count',
            placeholderColumns: 'Column'
        };
    }
    prop(path, options = {}) {
        return this.handler.prop(path, Object.assign(Object.assign({}, options), { label: this.label }));
    }
    render() {
        const { labelOrientationH, labelOrientationV } = this.label;
        return (h(ElementQuestionBase, { question: this.prop('question', { localize: true }), required: this.prop('required') },
            h("bce-option-creator", Object.assign({}, this.prop('columns'), { label: this.label })),
            h("bce-select", Object.assign({}, this.prop('orientation')),
                h("bce-option", { value: "horizontal" }, labelOrientationH),
                h("bce-option", { value: "vertical" }, labelOrientationV)),
            h("bce-input", Object.assign({ type: "number" }, this.prop('maxRows'))),
            h("slot", null)));
    }
    static get is() { return "bce-element-table-editor"; }
    static get encapsulation() { return "shadow"; }
    static get properties() { return {
        "handler": {
            "type": "unknown",
            "mutable": false,
            "complexType": {
                "original": "InputHandler",
                "resolved": "InputHandler",
                "references": {
                    "InputHandler": {
                        "location": "import",
                        "path": "../../../utils/input-handler"
                    }
                }
            },
            "required": true,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            }
        },
        "language": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string | undefined",
                "references": {}
            },
            "required": false,
            "optional": true,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "language",
            "reflect": false
        },
        "label": {
            "type": "unknown",
            "mutable": false,
            "complexType": {
                "original": "TableElement.Label",
                "resolved": "Label",
                "references": {
                    "TableElement": {
                        "location": "import",
                        "path": "./element-table"
                    }
                }
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "defaultValue": "{\n    name: 'Table',\n    labelQuestion: 'Formulate your question',\n    labelRequired: 'Required',\n    labelOCOptionAdd: 'Add Column',\n    labelOCOptionRemove: 'Delete Column',\n    labelOrientation: 'Ori\u00EBntation',\n    labelOrientationH: 'Horizontal',\n    labelOrientationV: 'Vertical',\n    labelMaxRows: 'Max row count',\n    placeholderColumns: 'Column'\n  }"
        }
    }; }
}
