angular.module("c8y.qrCode",["monospaced.qrcode"]).config(["c8yViewsProvider","c8yActionsProvider","gettext",function(e,t,o){var n=":::PLUGIN_PATH:::/views/";e.when("/device/:deviceId",{templateUrl:"".concat(n,"index.html"),priority:600,name:o("QR code"),icon:"qrcode",showIf:["qrCodeTemplate",function(e){return e.getTemplate(e.qrCodeTypes.DEVICE).then(function(e){return!!e})}],controller:["$scope","$routeParams","c8yDevices",function(t,e,o){t.device={},o.detailCached(e.deviceId).then(function(e){t.device=e.data})}]}),e.when("/route/:routeId",{templateUrl:"".concat(n,"index.html"),priority:1e3,name:o("QR code"),icon:"qrcode",showIf:["qrCodeTemplate","$routeParams",function(e,t){return e.getTemplate(e.qrCodeTypes.ROUTE).then(function(e){return!!e&&"new"!==t.routeId})}],controller:["$scope","$routeParams","c8yBase","c8yInventory",function(t,e,o,n){t.route={},n.detailCached(e.routeId).then(o.getResData).then(function(e){t.route=e})}]}),t.addUrlAction({path:"/device",text:o("Print QR codes"),actionBar:!0,showIf:["$routeParams","qrCodeTemplate",function(t,e){return e.getTemplate(e.qrCodeTypes.DEVICE).then(function(e){return!!e&&!!_.isUndefined(t.deviceId)})}],action:["$rootScope","qrCodeTemplate","qrCodePrinter",function(e,o,n){var r=e.$on("deviceList.loadedDevicesList",function(e,t){t&&0<t.length&&o.getTemplate(o.qrCodeTypes.DEVICE).then(function(e){n.print(t,e)}),r()});e.$emit("deviceList.getLoadedDevicesList")}]}),t.addUrlAction({path:"/route",text:o("Print QR codes"),actionBar:!0,showIf:["$routeParams","qrCodeTemplate",function(t,e){return e.getTemplate(e.qrCodeTypes.ROUTE).then(function(e){return!!e&&!!_.isUndefined(t.routeId)})}],action:["$rootScope","qrCodeTemplate","qrCodePrinter",function(e,o,n){var r=e.$on("routesList.loadedRoutesList",function(e,t){t&&0<t.length&&o.getTemplate(o.qrCodeTypes.ROUTE).then(function(e){n.print(t,e)}),r()});e.$emit("routesList.getLoadedRoutesList")}]})}]);