define [ "base" ], (App) -> App.directive "reviewPanelToggle", () -> restrict: "E" scope: onToggle: '&' ngModel: '=' disabled: '=?' onDisabledClick: '=?' link: (scope) -> if !scope.disabled? scope.disabled = false scope.onChange = (args...) -> scope.onToggle({ isOn: scope.localModel }) scope.handleClick = () -> if scope.disabled scope.onDisabledClick() scope.localModel = scope.ngModel scope.$watch "ngModel", (value) -> scope.localModel = value template: """
"""