import { __decorate } from "tslib";
import { throttle } from '@ibizstudio/runtime';
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '../../../../decorators';
import { AppDefaultFormDetail } from '../app-default-form-detail/app-default-form-detail';
/**
 * 表单UI组件
 *
 * @export
 * @class AppDefaultFormTabPanel
 * @extends {Vue}
 */
let AppDefaultFormTabPanel = class AppDefaultFormTabPanel extends AppDefaultFormDetail {
    /**
     * 绘制内容
     *
     * @returns {*}
     * @memberof AppDefaultFormTabPanel
     */
    render() {
        var _a;
        const { detailClassNames } = this.renderOptions;
        let { codeName, caption, contentHeight, contentWidth } = this.detailsInstance;
        let style = {
            height: contentHeight ? contentHeight + 'px' : false,
            width: contentWidth ? contentWidth + 'px' : false,
        };
        // 设置默认值
        let layoutmode = ((_a = this.detailsInstance.getPSLayout()) === null || _a === void 0 ? void 0 : _a.layout) || 'TABLE_24COL';
        caption = caption || codeName;
        return (<tabs v-show={this.runtimeModel.visible} style={style} animated={false} name={codeName.toLowerCase()} class={Object.assign({ 'app-tabpanel-flex': layoutmode == 'FLEX' }, detailClassNames)} value={this.runtimeModel.activatedPage} on-on-click={(e) => {
                var _a;
                throttle((_a = this.runtimeModel) === null || _a === void 0 ? void 0 : _a.clickPage, [e], this);
            }}>
        {this.$slots.default}
      </tabs>);
    }
};
AppDefaultFormTabPanel = __decorate([
    Component({}),
    VueLifeCycleProcessing()
], AppDefaultFormTabPanel);
export { AppDefaultFormTabPanel };
