import { NgModule } from '@angular/core' ; import { CommonModule } from '@angular/common' ; import { CmsStructureConfig , ContentSlotComponentData , CmsPageSlotsConfig , ConfigModule , CmsConfig , } from '@spartacus/core' ; import { DvntBestsellingProductsComponent } from './dvnt-bestselling-products/dvnt-bestselling-products.component' ; import { DvntBestsellingProductsModule } from './dvnt-bestselling-products/dvnt-bestselling-products.module' ; import { DvntNewProductsComponent } from './dvnt-new-products/dvnt-new-products.component' ; import { DvntNewProductsModule } from './dvnt-new-products/dvnt-new-products.module' ; @ NgModule ( { declarations : [ ] , imports : [ CommonModule , DvntBestsellingProductsModule , DvntNewProductsModule , ConfigModule . withConfigFactory ( cmsStructureConfig ) , ConfigModule . withConfig ( { cmsComponents : { DvntBestsellingProductsComponent : { component : DvntBestsellingProductsComponent , } , DvntNewProductsComponent : { component : DvntNewProductsComponent , } , } , } as CmsConfig ) , ConfigModule . withConfig ( { layoutSlots : { LandingPage2Template : { slots : [ 'Section1' , 'Section2C' , 'DvntBestsellingProducts' , 'DvntNewProducts' , ] , } , } , } ) , ] , } ) export class DvntLandingPageModule { } export const staticComponents = { DvntBestsellingProductsComponent : { typeCode : 'DvntBestsellingProductsComponent' , flexType : 'DvntBestsellingProductsComponent' , uid : 'DvntBestsellingProductsComponent' , } , DvntNewProductsComponent : { typeCode : 'DvntNewProductsComponent' , flexType : 'DvntNewProductsComponent' , uid : 'DvntNewProductsComponent' , } , } ; const cmsPageSlotConfig = { DvntBestsellingProducts : { componentIds : [ 'DvntBestsellingProductsComponent' ] , } , DvntNewProducts : { componentIds : [ 'DvntNewProductsComponent' ] , } , } ; export function cmsStructureConfig ( ) { return { cmsStructure : { components : { ... staticComponents , } , slots : { ... cmsPageSlotConfig , } , } , } ; }