/**
 *
 */
angular.module("myApp", ["ui.router"]).config(function ($stateProvider, $urlRouterProvider, $locationProvider) {

    $locationProvider.hashPrefix('');
    $urlRouterProvider.otherwise("/employees");

    $stateProvider

        .state("layout1", {
            abstract: true,
            views: {
                "layout": {
                    templateUrl: "layout/layout1.html"
                }
            }
        })

        .state("layout2", {
            abstract: true,
            views: {
                "layout": {
                    templateUrl: "layout/layout2.html"
                }
            }
        })

        // .state('app', {
        //     abstract: true,
        //     views: {
        //         'main_layout': {
        //             templateUrl: 'main_layout.html',
        //         }
        //     }
        // })


        .state("employees", {
            parent: 'layout1',
            url: "/employees",
            views: {
                "content": {
                    templateUrl: "pages/employee/employee.html",
                    controller: "employeeController"
                }
            }
        })
        .state("project", {
            parent: 'layout1',
            url: "/project",
            views: {
                "content": {
                    templateUrl: "pages/project/project.html",
                    controller: "projectController"
                }
            }
        })
        .state("report", {
            parent: 'layout1',
            url: "/report",
            views: {
                "content": {
                    templateUrl: "pages/employee/project.html",
                    controller: "employeeController"
                }
            }
        })

        .state("testlayout2", {
            parent: 'layout2',
            url: "/testttt",
            views: {
                "content": {
                    templateUrl: "pages/testlayout/testlayout.html",
                    controller: "testlayoutController"
                }
            }
        })

});


// myApp.directive('ngConfirmClick', [ function() {
//     return {
//         link : function(scope, element, attr) {
//             var msg = attr.ngConfirmClick || "Are you sure?";
//             var clickAction = attr.confirmedClick;
//             element.bind('click', function(event) {
//                 if (window.confirm(msg)) {
//                     scope.$eval(clickAction)
//                 }
//             });
//         }
//     };
// } ])