import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { CommonModule as NgCommonModule, APP_BASE_HREF } from '@angular/common';
import { Routes, RouterModule } from '@angular/router';

import { RuntimeBaseModule } from '@wm/runtime/base';
{{WMComponentsImportStmts requiredWMComponents}}

import { {{componentName}} } from './{{name}}.component';
import { AppCodeGenModule } from '../../app-codegen.module';

{{PrefabPartialModuleImportStmts requiredPartials}}

const requiredComponentModules = [
    {{WMComponentModuleStmts requiredWMComponents}}
];

const requiredPartialModules = [
    {{PartialModuleStmts requiredPartials}}
];

@NgModule({
    declarations: [{{componentName}}],
    imports: [
        ...requiredComponentModules,
        ...requiredPartialModules,
        NgCommonModule,
        AppCodeGenModule,
        RuntimeBaseModule
    ],
    exports: [{{componentName}}],
    {{#if hasCustomElement}}
    schemas: [CUSTOM_ELEMENTS_SCHEMA],
    {{/if}}
    entryComponents: [{{componentName}}]
})
export class {{moduleName}} {
    static rootComponent = {{componentName}};
}

