import { MapViewBase } from '../../../view/mapview-base';
import { AppLayoutService } from '../../../app-service/common-service/app-layout-service';
/**
 * 应用地图视图基类
 *
 * @export
 * @class AppMapViewBase
 * @extends {MapViewBase}
 */
export class AppMapViewBase extends MapViewBase {
    /**
     * 地图视图渲染
     *
     * @memberof AppMapViewBase
     */
    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, model: this.model, modelService: this.modelService, viewparams: this.viewparams, context: this.context },
        }, [
            this.renderTopMessage(),
            this.renderToolBar(),
            this.renderQuickGroup(),
            this.renderQuickSearch(),
            !(((_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.renderBodyMessage(),
            this.renderMainContent(),
            this.renderBottomMessage(),
        ]);
    }
}
