(()=>{function e(t,e,r,n,o,a,c){var d,u=e.deviceId,i=e.routeId,l=u||i,C=null;function p(e){d=e,t.qrCodeTemplate=d}function q(){return o.detailCached(l).then(n.getResData)}function s(e){C=e,t.data=C}t.print=function(){c.print([C],d)},(()=>{var e=(()=>i?a.qrCodeTypes.ROUTE:!!u&&a.qrCodeTypes.DEVICE)();return e?a.getTemplate(e):r.reject()})().then(p).then(q).then(s)}e.$inject=["$scope","$routeParams","$q","c8yBase","c8yInventory","qrCodeTemplate","qrCodePrinter"],angular.module("c8y.qrCode").controller("qrCodeCtrl",e)})();