'use strict';

var angular = require('angular');
require('./modules');
require('uiRouter');

var module = angular.module('devicemanager.routes');

module.config(function($stateProvider) {
  $stateProvider
  .state('devicemanager', {
    url: '/devicemanager',
    template: '<ion-view cache-view="false" view-direction="none"><ion-nav-view></ion-nav-view></ion-view>'
  })
  .state('devicemanager.devicerecord', {
    url: '/deviceRecordShow',
    templateUrl: 'views/devicemanager/deviceManager.tpl.html',
    controller: 'DeviceListCtrl'
  })
  .state('devicemanager.showLoginHistory', {
    url: '/showLoginHistory',
    templateUrl: 'views/devicemanager/showLoginHistory.tpl.html',
    controller: 'DeviceManagerCtrl',
    data: {
      pageType: 'showLoginHistory'
    }
  })
  .state('devicemanager.accountProtect', {
    url: '/accountProtect',
    templateUrl: 'views/devicemanager/accountProtect.tpl.html',
    controller: 'DeviceManagerCtrl'
  })
  .state('devicemanager.lockPage', {
    url: '/lockPage',
    templateUrl: 'views/devicemanager/lockPage.tpl.html',
    controller: 'DeviceLockCtrl'
  })
  .state('devicemanager.bindedToOtherUser', {
    url: '/bindedToOtherUser',
    controller: 'DeviceBindCtrl',
    templateUrl: 'views/devicemanager/bindedToOtherUser.tpl.html'
  })
  .state('devicemanager.unBinded', {
    url: '/unBinded',
    controller: 'DeviceBindCtrl',
    templateUrl: 'views/devicemanager/unBinded.tpl.html'
  })
  .state('devicemanager.deviceError', {
    url: '/devcieError',
    templateUrl: 'views/devicemanager/deviceError.tpl.html',
    controller: 'DeviceError'
  });
});
