"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[3804],{26200(D,l,t){t.r(l),t.d(l,{default:()=>C});var e=t(74848),c=t(54148),a=t(92745),d=t(34999),u=t(16692),v=t(59062),m=t(91984),f=t(57276),h=t(5358),p=t(22628),x=t(88547),y=t(36826),A=t(41654),j=t(45861),T=t(66404),P=t(39187);const G=({name:n,returnToFallback:r})=>{const{returnTo:o}=(0,P.h)(r);return(0,e.jsxs)(A.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)(T.E,{element:"h1",truncate:!0,children:n})]})};var I=t(65910);const N=()=>{const{name:n=""}=(0,c.g)(),{selectedAlertmanager:r=""}=(0,h.VI)(),[,o]=(0,u.L7)(u.QI.ViewAlertGroups),{getRouteGroupsMap:s}=(0,v.L)(),{currentData:i,refetch:S}=m.m.useGetAlertmanagerAlertGroupsQuery({amSourceName:r},{skip:!o||!r}),g=decodeURIComponent(n);return g?(0,e.jsx)(I.X,{routeName:g,alertGroups:i,refetchAlertGroups:S,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 R(){const{name:n=""}=(0,c.g)(),r=n===p.DM?"Default Policy":decodeURIComponent(n),{navId:o,pageNav:s}=(0,f.i3)();return(0,e.jsx)(y.y,{navId:o,accessType:"notification",pageNav:{text:r,parentItem:s},renderTitle:i=>(0,e.jsx)(G,{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)(N,{})})}const C=(0,x.S)(R)}}]);

//# sourceMappingURL=PolicyPage.97639b8b6be5f6573df5.js.map