(()=>{function t(a,t,o,i){b.$inject=["$q","$location","$uibModal","gettextCatalog","c8yTitle"],v.$inject=["$routeParams"];var l="c8y-simulator",r="installing-updates",c="installing-updates",s="clock-o",u="refresh",m="c8y-energy",d="simulators",e="".concat(d,"/:deviceId"),n={template:"<c8y-simulators-list></c8y-simulators-list>"},p={template:'<c8y-simulator-detail simulator-id="vm.id"></c8y-simulator-detail>',name:a("Instructions"),icon:r},y={template:'<c8y-simulator-operations simulator-id="vm.id"></c8y-simulator-operations>',name:a("Supported operations"),icon:m},f={controllerAs:"vm",controller:v},g={data:["$q",function(t){return t.when({templateUrl:":::PLUGIN_PATH:::/detail/title.html"})}]};function v(t){this.id=t.simulatorId}function h(){t.addNavigation({name:a("Simulators"),parent:a("Devices"),path:d,icon:l,priority:1e3,routerLinkExact:!1,showIf:["c8yApplication",function(t){return t.isAvailable({name:"device-simulator",type:"MICROSERVICE"})}]})}function S(){o.when("/".concat(d),n);var i=0;_.forEach([p,y],function(t){_.assign(t,f,{priority:i--}),o.when("/".concat(e),t)})}function I(){i.addTitle("/".concat(e),g)}function b(t,i,o,e,n){return{setListTitle:function(){n.changeTitle({title:a("Simulators")})},listing:function(){i.path("/".concat(d))},edit:function(t){i.path("/".concat(d,"/").concat(t.id))},cloneDialog:function(i){return o.open({size:"sm",component:"c8ySimulatorCloneDialog",ariaLabelledBy:"modal-title",ariaDescribedBy:"modal-body",resolve:{simulator:function(){var t=_.cloneDeep(i);return t.name=e.getString("Duplicate of {{name}}",t),t}}}).result},addCustomOperationDialog:function(){return o.open({size:"sm",component:"c8yOperationAddDialog",ariaLabelledBy:"modal-title",ariaDescribedBy:"modal-body"}).result},editSimulatorInstances:function(t){return o.open({templateUrl:":::PLUGIN_PATH:::/add/simulatorAddorEdit.modal.html",controller:["newSimulator","$uibModalInstance",function(t,i){var o=this;o.editInstances=!0,o.newSimulator=t,o.ok=function(){i.close(o.newSimulator.instances)},o.cancel=i.dismiss}],resolve:{newSimulator:_.constant(_.clone(t))},controllerAs:"vm"}).result},icons:{simulator:l,instruction:r,message:c,builtin:c,sleep:s,loop:u,operations:m}}}return{$get:b,configBlock:function(){S(),h(),I()},hookTitle:I,hookViews:S,hookNavigation:h}}t.$inject=["gettext","c8yNavigatorProvider","c8yViewsProvider","c8yTitleProvider"],angular.module("c8y.simulators").provider("c8ySimulatorsUi",t)})();