import { HtmlViewBase } from '../../../view/htmlview-base';
import { AppLayoutService } from '../../../app-service/common-service/app-layout-service';
/**
 * 实体html视图基类
 *
 * @export
 * @class AppHtmlViewBase
 * @extends {HtmlViewBase}
 */
export class AppHtmlViewBase extends HtmlViewBase {
    /**
     * 实体html视图渲染
     *
     * @memberof AppHtmlViewBase
     */
    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.renderBodyMessage(), this.renderMainContent(), this.renderBottomMessage()]);
    }
}
