import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { <%= classify(name) %>Component } from './<%= dasherize(name) %>.component';
import { <%= classify(name) %>ChildrenRoutes } from './<%= dasherize(name) %>-routes';
<% if (profileName && profileName !== 'anonymous') { %>import { DeviceAuthGuard } from '@iotize/ionic/auth';<% } %>

const routes: Routes = [
    {
        path: '',
        component: <%= classify(name) %>Component
        <% if (profileName && profileName !== 'anonymous') { %>, canActivate: [
          DeviceAuthGuard
        ]
        , data: {
          username: ['<%= profileName %>']
        }
        <% } %>
        , children: <%= classify(name) %>ChildrenRoutes
    }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class <%= classify(name) %>RoutingModule { }
