/**
 * Created through mkmodule
 */

import { NgModule }             from '@angular/core'
import { RouterModule, Routes } from '@angular/router'


import { B2B_CategoryView } from './components/view/cmp.view'


/**
 * Generates the possibility to have categories and subcategories in navigation, this only works in a single level of subcategory.
 * It can be expanded, but that will require further duplication of code. by cloning and nesting the `{path: 'category'}` element
 * it is possible to duplicate to an endless level.
 * 
 * This could be handled a bit by placing the function in a seperate variable and then iterate it into, but for the current scope
 * we will only introduce a single sub level.
 * 
 * The produced structure is something like:
 * 
 * `categories/:key`
 * `categories/:key/product/:key`
 * `categories/:key/category/:key`
 * `categories/:key/category/:key/product/:key`
 */
 const routes: Routes = [
	// {
	// 	path: '',
	// 	loadChildren: '@k-core/modules/catalog/mod.catalog#CatalogModule'
	// },
	{
		path: '**',
		component: B2B_CategoryView
		// children: [
		// 	{
		// 		path: '**',
		// 		component: ViewComponent
		// 	}
		// ]
	}
]


@NgModule({
    imports: [
        RouterModule.forChild(routes)
    ],
    exports: [
        RouterModule
    ]
})
export class CategoryRouting { }

