angular.module("c8y.ui").provider("c8yTitle",function(){var t={};function o(n){return _.find(t,function(e){return e.regexp.test(n)})}return{addTitle:function(e,n){t[e]=n,t[e].regexp=new RegExp(e.replace(/:[^/]+/g,"(.+)").replace(/\//g,"\\/"))},$get:["$rootScope","$q","$location",function(e,n,t){var i,r=e.$new(!0);return r.setMainComponent=function(e){if(i)throw new Error("<c8y-ui-title> main component already created. there can only be one");i=e},r.clearMainComponent=function(){i=void 0},r.setTitleElement=function(e){i&&i.setTitleElement(e)},r.clearTitleElement=function(){i&&i.clearTitleElement()},r.isTitleVisible=function(){return!(!i||!i.isTitleVisible())},r.get=o,r.changeTitle=function(e){var e=n.when(e);e._path=t.path(),e=e,r.$emit("title",e)},r}]}});