(()=>{function t(t,n,i){var e,s=this;_.assign(s,{$onInit:function(){var t=s.simulatorCtrl;_.assign(s,{select:t.selectInstruction,remove:t.remove,isInstructionSelected:t.isInstructionSelected}),n.listAllPublishMessages().then(function(t){e=t})},uiSortableOptions:{handle:".handle",update:function(){s.simulatorCtrl.saveCurrentSimulatorCommands()},helper:function(t,n){n=n.clone();return n.css({transition:"none"}),n.find(".handle").css({visibility:"visible"}),n}},add:function(t){s.select(t),s.instructions.push(t)},title:function(t){return n.instructionTitle(t,e)},icons:i.icons,canDrag:function(t){t=angular.fromJson(angular.toJson(t));return!_.isEqual(_.keys(t),["type"])},checkClickable:function(t){return s.isInstructionSelected(t)?{"pointer-events":"none"}:{}}})}t.$inject=["gettext","c8ySimulators","c8ySimulatorsUi"],angular.module("c8y.simulators").component("c8ySimulatorInstructionList",{templateUrl:":::PLUGIN_PATH:::/detail/instructionList.html",require:{simulatorCtrl:"^c8ySimulatorDetail"},bindings:{instructions:"<"},controllerAs:"vm",controller:t})})();