import { __decorate } from "tslib";
import { Component } from 'vue-property-decorator';
import { AppDefaultSearchFormDetail } from '../app-default-searchform-detail/app-default-searchform-detail';
import { VueLifeCycleProcessing } from '../../../../decorators';
/**
 * 表单UI组件
 *
 * @export
 * @class AppDefaultSearchFormPage
 * @extends {Vue}
 */
let AppDefaultSearchFormPage = class AppDefaultSearchFormPage extends AppDefaultSearchFormDetail {
    /**
     * 绘制表单分页标题
     *
     * @param {*} viewPanel
     * @returns
     * @memberof AppDefaultSearchFormPage
     */
    renderLabel() {
        var _a;
        const { caption } = this.detailsInstance;
        const sysCss = this.detailsInstance.getLabelPSSysCss();
        const sysImg = this.detailsInstance.getPSSysImage();
        let labelClass = (sysCss === null || sysCss === void 0 ? void 0 : sysCss.cssName) ? 'caption ' + sysCss.cssName : 'caption';
        let labelCaption = this.$tl((_a = this.detailsInstance.getCapPSLanguageRes()) === null || _a === void 0 ? void 0 : _a.lanResTag, caption);
        let labelIcon;
        if (sysImg) {
            if (sysImg === null || sysImg === void 0 ? void 0 : sysImg.imagePath) {
                labelIcon = <img src={sysImg === null || sysImg === void 0 ? void 0 : sysImg.imagePath} style={{ 'margin-right': '2px' }}></img>;
            }
            else {
                labelIcon = <i class={sysImg === null || sysImg === void 0 ? void 0 : sysImg.cssClass} style={{ 'margin-right': '2px' }}></i>;
            }
        }
        return <span class={labelClass}>
            {labelIcon}{labelCaption}
        </span>;
    }
    /**
     * 绘制内容
     *
     * @returns {*}
     * @memberof AppDefaultSearchFormPage
     */
    render() {
        var _a;
        const { detailClassNames } = this.renderOptions;
        const { codeName } = this.detailsInstance;
        const { appDataEntity, codeName: formCodeName, controlType } = this.controlInstance;
        const tabsName = `${(_a = appDataEntity === null || appDataEntity === void 0 ? void 0 : appDataEntity.codeName) === null || _a === void 0 ? void 0 : _a.toLowerCase()}_${controlType === null || controlType === void 0 ? void 0 : controlType.toLowerCase()}_${formCodeName === null || formCodeName === void 0 ? void 0 : formCodeName.toLowerCase()}`;
        return <tab-pane label={this.renderLabel} name={codeName} index={this.index} tab={tabsName} class={detailClassNames} style={this.runtimeModel.visible ? '' : 'display: none;'}>
            {this.$slots.default}
        </tab-pane>;
    }
};
AppDefaultSearchFormPage = __decorate([
    Component({}),
    VueLifeCycleProcessing()
], AppDefaultSearchFormPage);
export { AppDefaultSearchFormPage };
