"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[3804],{2527(D,l,t){t.r(l),t.d(l,{default:()=>S});var e=t(74848),u=t(54148),g=t(56776),a=t(52358),d=t(33100),v=t(32658),m=t(25482),f=t(75129),h=t(33429),p=t(30465),x=t(71897),y=t(77628),A=t(25877),T=t(68763),j=t(45270),P=t(74144),G=t(31138);const N=({name:r,returnToFallback:n})=>{const{returnTo:o}=(0,G.h)(n);return(0,e.jsxs)(T.B,{direction:"row",gap:1,minWidth:0,alignItems:"center",children:[(0,e.jsx)(j.z9,{"aria-label":(0,a.t)("alerting.title.aria-label-return-to","Return to previous view"),variant:"secondary",icon:"angle-left",href:o}),(0,e.jsx)(P.E,{element:"h1",truncate:!0,children:r})]})};var R=t(52608);const C=()=>{const{name:r=""}=(0,u.g)(),{selectedAlertmanager:n=""}=(0,x.VI)(),{granted:o}=(0,h.B)(v.qD.View),{getRouteGroupsMap:s}=(0,m.L)(),{currentData:i,refetch:B}=f.m.useGetAlertmanagerAlertGroupsQuery({amSourceName:n},{skip:!o||!n}),c=decodeURIComponent(r);return c?(0,e.jsx)(R.X,{routeName:c,alertGroups:i,refetchAlertGroups:B,getRouteGroupsMap:s}):(0,e.jsx)(d.F,{severity:"error",title:(0,a.t)("alerting.policies-tree-wrapper.title-routing-tree-not-found","Routing tree not found"),children:(0,e.jsx)(a.x6,{i18nKey:"alerting.policies-tree-wrapper.sorry-routing-exist",children:"Sorry, this routing tree does not seem to exist."})})};function I(){const{name:r=""}=(0,u.g)(),n=(0,g.N$)(r)?"Default Policy":decodeURIComponent(r),{navId:o,pageNav:s}=(0,p.i3)();return(0,e.jsx)(A.y,{navId:o,accessType:"notification",pageNav:{text:n,parentItem:s},renderTitle:i=>(0,e.jsx)(N,{name:i,returnToFallback:"/alerting/routes"}),subTitle:(0,a.t)("alerting.policy-page.text-subtitle","Determine how alerts are routed to contact points for alert rules configured to use this notification policy."),children:(0,e.jsx)(C,{})})}const S=(0,y.S)(I)}}]);

//# sourceMappingURL=PolicyPage.8bea4417a56a84712abc.js.map