import { __decorate } from "tslib";
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '../../../decorators';
import { EditorBase } from '../editor-base/editor-base';
/**
 * 开关控件编辑器
 *
 * @export
 * @class SwitchEditor
 * @extends {EditorBase}
 */
let SwitchEditor = class SwitchEditor extends EditorBase {
    /**
     * 编辑器change事件
     *
     * @param {*} value
     * @memberof SwitchEditor
     */
    handleChange($event) {
        this.editorChange({ name: this.editorInstance.name, value: $event });
    }
    /**
     * 绘制内容
     *
     * @returns {*}
     * @memberof SwitchEditor
     */
    render() {
        if (!this.editorIsLoaded) {
            return null;
        }
        return this.$createElement(this.editorComponentName, {
            props: Object.assign({ name: this.editorInstance.name, value: this.value, disabled: this.disabled }, this.customProps),
            on: { change: this.handleChange },
            style: this.customStyle
        });
    }
};
SwitchEditor = __decorate([
    Component({}),
    VueLifeCycleProcessing()
], SwitchEditor);
export default SwitchEditor;
