import { TabExpViewBase } from '../../../view/tabexpview-base';
import { AppLayoutService } from '../../../app-service/common-service/app-layout-service';
/**
 * 应用分页导航视图基类
 *
 * @export
 * @class AppTabExpViewBase
 * @extends {TabExpViewBase}
 */
export class AppTabExpViewBase extends TabExpViewBase {
    /**
     * 渲染数据面板
     *
     * @memberof AppTabExpViewBase
     */
    renderDataPanel() {
        var _a;
        if (this.dataPanelInstance) {
            let { targetCtrlName, targetCtrlParam, targetCtrlEvent } = this.computeTargetCtrlData(this.dataPanelInstance);
            return this.$createElement(targetCtrlName, { slot: 'datapanel', ref: (_a = this.dataPanelInstance) === null || _a === void 0 ? void 0 : _a.name, props: targetCtrlParam, on: targetCtrlEvent });
        }
    }
    /**
     * 分页导航视图渲染
     *
     * @memberof AppTabExpViewBase
     */
    render(h) {
        var _a, _b;
        if (!this.viewIsLoaded) {
            return null;
        }
        const targetViewLayoutComponent = AppLayoutService.getLayoutComponent(`${(_a = this.viewInstance) === null || _a === void 0 ? void 0 : _a.viewType}-${(_b = this.viewInstance) === null || _b === void 0 ? void 0 : _b.viewStyle}`);
        return h(targetViewLayoutComponent, {
            props: { viewInstance: this.viewInstance, model: this.model, modelService: this.modelService, viewparams: this.viewparams, context: this.context },
        }, [this.renderTopMessage(), this.renderCaptionInfo(), this.renderDataPanel(), this.renderBodyMessage(), this.renderToolBar(), this.renderMainContent(), this.renderBottomMessage()]);
    }
}
