var angular = require('angular');
require('../modules');

angular
  .module('flowmodulebase.directives')
  .directive('sinoStopOperate', sinoStopOperate);

/** @ngInject */
function sinoStopOperate() {
  return {
    restrict: 'E',
    require: '^sinoStopOperateInfo',
    link: linkFn
  };
  
  function linkFn(scope, element, attrs, ctrl) {
    ctrl.registerGetOperateFn(function() {
      return {
        show: scope.$eval(attrs.show),
        content: attrs.content
      };
    });
  }
}
