(function () {
    'use strict';

    angular
        .module('setoresApp')
        .directive('ferramentasContext', ferramentasContext);

    ferramentasContext.$inject = ['__env'];

    function ferramentasContext(__env) {
        let directive = {
            link: link,
            restrict: 'A',
            replace: false,
            scope: false
        };

        return directive;

        function link(scope, element, attributes) {
            attributes.$observe('ferramentasContext', function (value) {
                if(scope.vm.toggleSelecaoMapa && scope.vm.toggleJustificativa){
                    scope.vm.toggleSelecaoMapa(false);
                    scope.vm.toggleJustificativa(false);
                }
            });
        }
    }
})();
