"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[3804],{2527(B,l,t){t.r(l),t.d(l,{default:()=>D});var e=t(74848),c=t(54148),a=t(52358),g=t(33100),d=t(32658),v=t(25482),m=t(75129),f=t(33429),h=t(30465),p=t(71897),x=t(13425),y=t(77628),A=t(25877),j=t(68763),T=t(45270),P=t(74144),G=t(31138);const N=({name:n,returnToFallback:r})=>{const{returnTo:o}=(0,G.h)(r);return(0,e.jsxs)(j.B,{direction:"row",gap:1,minWidth:0,alignItems:"center",children:[(0,e.jsx)(T.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:n})]})};var R=t(52608);const C=()=>{const{name:n=""}=(0,c.g)(),{selectedAlertmanager:r=""}=(0,p.VI)(),{granted:o}=(0,f.B)(d.qD.View),{getRouteGroupsMap:s}=(0,v.L)(),{currentData:i,refetch:S}=m.m.useGetAlertmanagerAlertGroupsQuery({amSourceName:r},{skip:!o||!r}),u=decodeURIComponent(n);return u?(0,e.jsx)(R.X,{routeName:u,alertGroups:i,refetchAlertGroups:S,getRouteGroupsMap:s}):(0,e.jsx)(g.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:n=""}=(0,c.g)(),r=n===x.DM?"Default Policy":decodeURIComponent(n),{navId:o,pageNav:s}=(0,h.i3)();return(0,e.jsx)(A.y,{navId:o,accessType:"notification",pageNav:{text:r,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 D=(0,y.S)(I)}}]);

//# sourceMappingURL=PolicyPage.0105db47650af86d4993.js.map