import { WFDynaEditViewBase } from '../../../view';
import { AppLayoutService } from '../../../app-service/common-service/app-layout-service';
/**
 * 应用实体工作流动态编辑视图基类
 *
 * @export
 * @class AppWFDynaEditViewBase
 * @extends {WFDynaEditViewBase}
 */
export class AppWFDynaEditViewBase extends WFDynaEditViewBase {
    /**
     * 编辑视图渲染
     *
     * @memberof AppWFDynaEditViewBase
     */
    render(h) {
        if (!this.viewIsLoaded) {
            return null;
        }
        const targetViewLayoutComponent = AppLayoutService.getLayoutComponent(`${this.viewInstance.viewType}-${this.viewInstance.viewStyle}`);
        return h(targetViewLayoutComponent, {
            props: { viewInstance: this.viewInstance, model: this.model, modelService: this.modelService, viewparams: this.viewparams, context: this.context },
        }, [this.renderCaptionInfo(), this.renderToolBar(), this.renderMainContent()]);
    }
}
