import { AppLayoutService } from '../../../app-service';
import { IndexViewBase } from '../../../view/indexview-base';
/**
 * 应用首页视图基类
 *
 * @export
 * @class AppIndexViewBase
 * @extends {IndexViewBase}
 */
export class AppIndexViewBase extends IndexViewBase {
    /**
     * 应用首页视图渲染
     *
     * @memberof AppIndexViewBase
     */
    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 },
            on: {
                onCollapseChange: (collapseChange) => {
                    this.collapseChange = collapseChange;
                },
            },
        }, [this.renderMainContent()]);
    }
}
