"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[6877],{2216(I,r,t){t.r(r),t.d(r,{default:()=>R});var a=t(14553),v=t(54148),i=t(52358),g=t(13400),c=t(33100),m=t(45329),f=t(29959),P=t(30465),h=t(71897),x=t(77628),u=t(25877),y=t(87284),C=t(32658),d=t(82586),j=t(69698),N=t(90069);const A=n=>{const e=!(0,y.OY)({action:C.VY.Update,context:n.alertmanagerName===d.hY?n.contactPoint:void 0}).granted;return n.alertmanagerName===d.hY?(0,a.jsx)(N.a,{contactPoint:n.contactPoint,readOnly:e,editMode:!0}):(0,a.jsx)(j.B,{alertManagerSourceName:n.alertmanagerName,contactPoint:n.contactPoint,readOnly:e,editMode:!0})},E=()=>{const{selectedAlertmanager:n}=(0,h.VI)(),{name:o=""}=(0,v.g)(),e=decodeURIComponent(o),{isLoading:Y,error:s,data:l}=(0,m.om)({name:e,alertmanager:n});return Y?(0,a.jsx)(g._,{text:(0,i.t)("alerting.edit-contact-point.text-loading","Loading...")}):s?(0,a.jsx)(c.F,{severity:"error",title:(0,i.t)("alerting.edit-contact-point.title-failed-to-fetch-contact-point","Failed to fetch contact point"),children:(0,f.JZ)(s)}):l?(0,a.jsx)(A,{alertmanagerName:n,contactPoint:l}):(0,a.jsx)(c.F,{severity:"error",title:(0,i.t)("alerting.edit-contact-point.title-receiver-not-found","Receiver not found"),children:"Sorry, this contact point does not seem to exist."})};function F(){const{navId:n,pageNav:o}=(0,P.We)();return(0,a.jsx)(u.y,{navId:n,pageNav:o,accessType:"notification",children:(0,a.jsx)(E,{})})}const R=(0,x.S)(F)}}]);

//# sourceMappingURL=EditContactPoint-react19.e2aefab6a8d59e4cb9a9.js.map