import { TabSearchViewBase } from '../../../view/tabsearchview-base';
import { AppLayoutService } from '../../../app-service/common-service/app-layout-service';
/**
 * 实体分页搜索视图基类
 *
 * @export
 * @class AppTabSearchViewBase
 * @extends {TabExpViewBase}
 */
export class AppTabSearchViewBase extends TabSearchViewBase {
    /**
     * 分页导航视图渲染
     *
     * @memberof AppTabSearchViewBase
     */
    render(h) {
        var _a, _b, _c, _d;
        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, viewparams: this.viewparams, context: this.context },
        }, [
            this.renderTopMessage(),
            this.renderCaptionInfo(),
            this.renderBodyMessage(),
            this.renderToolBar(),
            this.renderQuickSearch(),
            this.renderQuickSearchForm(),
            this.viewInstance.viewStyle == 'DEFAULT' ? this.renderTabsHeader() : null,
            !(((_c = this.viewInstance) === null || _c === void 0 ? void 0 : _c.viewStyle) == 'DEFAULT' && ((_d = this.viewInstance) === null || _d === void 0 ? void 0 : _d.enableQuickSearch)) ? [this.renderSearchForm(), this.renderSearchBar()] : null,
            this.renderMainContent(),
            this.renderBottomMessage(),
        ]);
    }
}
