import { MPickUpView2Base } from '../../../view/mpickupview2-base';
import { AppLayoutService } from '../../..';
export class AppMPickUpView2Base extends MPickUpView2Base {
    /**
     * 初始化containerModel
     *
     * @memberof AppMPickUpView2Base
     */
    initContainerModel(opts) {
        super.initContainerModel(opts);
        const { modeldata } = opts;
        modeldata === null || modeldata === void 0 ? void 0 : modeldata.getPSControls().forEach((ctrl) => {
            this.containerModel[`view_${ctrl.name}`] = { name: `${ctrl.name}`, type: `${ctrl.controlType}` };
        });
    }
    /**
     * 渲染
     *
     * @memberof AppMPickUpView2Base
     */
    render(h) {
        var _a, _b;
        if (!this.viewIsLoaded) {
            return;
        }
        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.renderToolBar(), this.renderMainContent(), this.renderBottomMessage()]);
    }
}
