/**
 *
 */
'use strict';
define(function() {
  var RightsCtrl = function($scope, RightsFactory, res) {
    /*


        $scope.resourceType = res.type;
        $scope.resource     = res.data;



        */
    /**
     * New user
     */
    /*
        $scope.createuser = function()
        {
            RightsFactory.adduser( $scope.resource, $scope.resource.pass,function (data) {
                require('toastr').info("je lance la requete" +data );
                RightsFactory.users.push( angular.copy(data));
                $scope.users=RightsFactory.users;
            },function (data) {} );
        };

        */
    /**
     * Delete user
     */
    /*
        $scope.deleteuser = function (){

            // On Retire les utilisateurs dans la table
            RightsFactory.removeuser($scope.resource.uid,function (data) {

                //UsersServices.users.push( angular.copy(data));
                for(var i = $scope.users.length; i--;) {
                    if($scope.users[i] === user) {
                        $scope.users.splice(i, 1);
                    }
                }
                require('toastr').success("Suppression effectué avec succés" );
                //UsersServices.users = $scope.users;
            },function (data) {});

        };

        */
    /**
     * New role
     */
    /*
        $scope.createrole = function()
        {
            RightsFactory.addrole( $scope.resource, function (data) {
                require('toastr').info("je lance la requete" +data );
                RightsFactory.roles.push( angular.copy(data));
                $scope.roles=RightsFactory.roles;
            },function (data) {} );

        };

        */
    /**
     * New group
     */
    /*
        $scope.creategroup = function()
        {
            RightsFactory.addgroup( $scope.resource, function (data) {
                require('toastr').info("je lance la requete" +data );
                RightsFactory.groups.push( angular.copy(data));
                $scope.groups=RightsFactory.groups;
            },function (data) {} );

        };



        */
    /**
     * Modal Tabs
     * @type {{title: string, content: string}[]}
     */
    /*
        if($scope.resourceType=="user"){

            $scope.tabs = [
                {
                    "title": "common.general",
                    "content": "js/XG/modules/rights/views/modals/modal.user_general.html"
                },
                {
                    "title": "rights.role.title",
                    "content": "js/XG/modules/rights/views/modals/modal.user_groups.html"
                },
                {
                    "title": "rights.group.title",
                    "content": "js/XG/modules/rights/views/modals/modal.user_roles.html"
                }
            ];
            $scope.tabs.activeTab = 0;

        }


    */
  };

  RightsCtrl.$inject = ['$scope', 'RightsFactory', 'resource'];
  return RightsCtrl;
});
