import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { Switch2D3DComponent} from '../../../projects/common-map3d/src/public-api';
import { MapComponent} from '../../../projects/common-map/src/public-api';

const routes = [   
    {
        path: '',
        component: MapComponent   
    },
    {
       path: ':xCenter/:yCenter/:zoom/:rotation/:baseLayer/:queryState',
       component: MapComponent,
       children: [
         {
           path: '',
           component: Switch2D3DComponent,
           outlet: 'map-controls'  
         }
       ]
    },
    {
       path: ':queryState', 
       component: MapComponent
    }
  ];

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