angular.module("c8y.ui").provider("c8yRenderers",function(){var t={};function n(n,r){if(t[n])throw new Error('Renderer "'.concat(n,'" already registered'));r.name=n,t[n]={config:r}}return{register:n,$get:["c8yModal",function(o){return{register:n,get:function(n,r){var e,n=t[n];return n?e=n.config:r&&(n=_.map(t,"config"),e=_.find(n,function(n){n=n.isDefaultFor;return"function"==typeof n&&n(r)})),e=e&&_.clone(e)},list:function(){return _.union([{name:void 0,humanName:"Default"}],_.map(t,function(n){n=_.clone(n.config);return n.hasConfig=!!n.configTemplateUrl,n}))},config:function(n){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},e=t[n];if(!e)throw new Error('Renderer "'.concat(n,'" not registered'));if(e.config.configTemplateUrl)return o({templateUrl:e.config.configTemplateUrl,controller:e.config.configController,resolve:{config:function(){return r}},size:"lg"});throw new Error('Renderer "'.concat(n,'" is not configurable'))},hasConfig:function(n){n=t[n];return n&&!!n.config.configTemplateUrl}}}]}});