/**
 * Angular module with controller
 */
var controllers = angular.module('panel.controllers', []);

controllers.controller('panel.controller', ['$scope', function ($scope) {

    $scope.panelOptions = {collapsed: false};

    $scope.expandPanel = function () {
        $scope.panelOptions.collapsed = false;
    };

    $scope.collapsePanel = function () {
        $scope.panelOptions.collapsed = true;
    };

    $scope.panelTitle = "Change me";

    $scope.panelVisible = true;

    $scope.showPanel = function() {
        $scope.panelVisible = true;
    };

    $scope.hidePanel = function() {
        $scope.panelVisible = false;
    };

    $scope.codeVisibleOf = {
        selectedOptionValue : null
    };

    $scope.usecases = [
        {
            value: "1", description: "Programmatic collapse and expand with Element"
        },
        {
            value: "2", description: "Variable title with Element"
        },
        {
            value: "3", description: "Title less panel"
        },
        {
            value: "4", description: "Show/hide panel"
        }
    ];

}]);