angular.module("app").directive("skinPicker", function($rootScope, SkinService) {
    return {
        restrict: 'E',
        replace: true,
        templateUrl: "../app/directives/skinPicker/skinPicker.html",
        scope: {},
        link: function (scope, element, attrs) {
            
            scope.changeSkin = function(skin){
                SkinService.changeSkin(skin);
            }

            scope.skins = SkinService.skins;
            scope.selectedSkin = SkinService.selectedSkin; 
        }
    };
});