import { h } from "@stencil/core";
import { ElementQuestionBase } from '../../../utils/element-question-base';
export class ElementSortEditor {
    constructor() {
        this.label = {
            name: 'Sort',
            labelQuestion: 'Formulate your question',
            labelRequired: 'Required',
            labelOCOptionAdd: 'Add Option',
            labelOCOptionRemove: 'Delete Option',
            labelOCImageUpload: 'Upload Image',
            labelOCImageDelete: 'Delete Image',
            labelDual: 'Dual',
            labelFeedbackCorrect: 'Feedback correct',
            labelFeedbackIncorrect: 'Feedback incorrect',
            placeholderOptions: 'Option',
            placeholderFeedbackCorrect: 'Feedback on correct answer',
            placeholderFeedbackIncorrect: 'Feedback on incorrect answer'
        };
    }
    prop(path, options = {}) {
        return this.handler.prop(path, Object.assign(Object.assign({}, options), { label: this.label }));
    }
    render() {
        return (h(ElementQuestionBase, { question: this.prop('question', { localize: true }), required: this.prop('required'), t: this.t },
            h("bce-option-creator", Object.assign({}, this.prop('options'), { label: this.t('me-option'), t: this.t })),
            h("bce-switch", Object.assign({}, this.prop('dual'))),
            h("bce-input", Object.assign({ type: "textarea" }, this.prop('feedbackCorrect', { localize: true }))),
            h("bce-input", Object.assign({ type: "textarea" }, this.prop('feedbackIncorrect', { localize: true }))),
            h("slot", null)));
    }
    static get is() { return "bce-element-sort-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": "any",
            "mutable": false,
            "complexType": {
                "original": "any",
                "resolved": "any",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "label",
            "reflect": false,
            "defaultValue": "{\n    name: 'Sort',\n    labelQuestion: 'Formulate your question',\n    labelRequired: 'Required',\n    labelOCOptionAdd: 'Add Option',\n    labelOCOptionRemove: 'Delete Option',\n    labelOCImageUpload: 'Upload Image',\n    labelOCImageDelete: 'Delete Image',\n    labelDual: 'Dual',\n    labelFeedbackCorrect: 'Feedback correct',\n    labelFeedbackIncorrect: 'Feedback incorrect',\n    placeholderOptions: 'Option',\n    placeholderFeedbackCorrect: 'Feedback on correct answer',\n    placeholderFeedbackIncorrect: 'Feedback on incorrect answer'\n  }"
        },
        "t": {
            "type": "unknown",
            "mutable": false,
            "complexType": {
                "original": "I18n.Translator",
                "resolved": "Translator<\"icon\" | \"image\" | \"link\" | \"text\" | \"false\" | \"true\" | \"add-item\" | \"answer\" | \"category\" | \"column\" | \"delete-item\" | \"description\" | \"example\" | \"hide-item\" | \"label\" | \"max\" | \"me-auto-play\" | \"me-block-subtitle\" | \"me-block-title\" | \"me-element-audio\" | \"me-element-checkbox-max\" | \"me-element-checkbox\" | \"me-element-download-placeholder\" | \"me-element-download\" | \"me-element-form\" | \"me-element-header-placeholder\" | \"me-element-header\" | \"me-element-icon\" | \"me-element-image\" | \"me-element-input-multiline\" | \"me-element-input\" | \"me-element-link\" | \"me-element-matrix\" | \"me-element-radio\" | \"me-element-slider\" | \"me-element-sort\" | \"me-element-table\" | \"me-element-text\" | \"me-element-video\" | \"me-flow-action-add\" | \"me-flow-action-delete\" | \"me-flow-action-end\" | \"me-flow-action-open\" | \"me-flow-condition-other\" | \"me-flow-condition-screen\" | \"me-flow-option-conditional\" | \"me-flow-option-end\" | \"me-flow-option-next\" | \"me-flow-subtitle\" | \"me-flow-title\" | \"me-input\" | \"me-module-advanced-options\" | \"me-module-graph-subtitle\" | \"me-module-graph-title\" | \"me-module-subtitle\" | \"me-module-title\" | \"me-option\" | \"me-options\" | \"me-orientation-h\" | \"me-orientation-v\" | \"me-orientation\" | \"me-other\" | \"me-question\" | \"me-required\" | \"min\" | \"name\" | \"row\" | \"show-item\" | \"step-size\" | \"text-left\" | \"text-right\" | \"upload-item\">",
                "references": {
                    "I18n": {
                        "location": "import",
                        "path": "@bce-technology/i18n"
                    }
                }
            },
            "required": true,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            }
        }
    }; }
}
