"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[6969],{76969:(p,s,e)=>{e.r(s),e.d(s,{default:()=>N});var t=e(96540),u=e(7392),d=e(51488),o=e(70383),a=e(42418),m=e(79944),g=e(5586),v=e(93407);const y=({config:n,templateName:l,alertManagerSourceName:r})=>{const i=n.template_files?.[l];if(!i)return t.createElement(a.F,{severity:"error",title:"Template not found"},"Sorry, this template does not seem to exists.");const c=(0,m.V)(l,Object.keys(n.template_files));return t.createElement(v.By,{alertManagerSourceName:r,config:n,existing:{name:c,content:(0,g.a)(i)}})},N=({match:n})=>{const{selectedAlertmanager:l}=(0,o.VI)(),{data:r,isLoading:i,error:c}=(0,d.f)(l),f=n?.params.name;return f?i&&!r?"loading...":c?String(c):r?t.createElement(y,{alertManagerSourceName:l,config:r,templateName:f}):null:t.createElement(u.L,{entity:"Notification template"})}},79944:(p,s,e)=>{e.d(s,{V:()=>t});function t(u,d){const o=u.replace(/\(copy( [0-9]+)?\)$/,"").trim();let a=`${o} (copy)`;for(let m=2;d.includes(a);m++)a=`${o} (copy ${m})`;return a}}}]);

//# sourceMappingURL=6969.f8f153735314f9426000.js.map