"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[8170],{38170:(i,n,e)=>{e.r(n),e.d(n,{default:()=>E});var t=e(39953),s=e(18644),r=e(72401),_=e(328),a=e(51858);const E=({match:m})=>{const{selectedAlertmanager:u}=(0,_.ZA)(),{data:l,isLoading:c,error:M}=(0,r.W)(u),D=m?.params.name;return D?c&&!l?"loading...":M?String(M):l?t.createElement(a.K,{alertManagerSourceName:u,config:l,templateName:D}):null:t.createElement(s.j,{entity:"Message template"})}},51858:(i,n,e)=>{e.d(n,{K:()=>o});var t=e(39953),s=e(33155),r=e(31559),_=e(8822),a=e(9853);const o=({config:E,templateName:m,alertManagerSourceName:u})=>{const l=E.template_files?.[m];if(!l)return t.createElement(s.b,{severity:"error",title:"Template not found"},"Sorry, this template does not seem to exists.");const c=(0,r.G)(m,Object.keys(E.template_files));return t.createElement(a.OZ,{alertManagerSourceName:u,config:E,existing:{name:c,content:(0,_.M)(l)}})}},31559:(i,n,e)=>{e.d(n,{G:()=>t});function t(s,r){const _=s.replace(/\(copy( [0-9]+)?\)$/,"").trim();let a=`${_} (copy)`;for(let o=2;r.includes(a);o++)a=`${_} (copy ${o})`;return a}}}]);

//# sourceMappingURL=8170.bbae001529b7da848ae5.js.map