"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[6877],{29617(I,d,t){t.r(d),t.d(d,{default:()=>R});var n=t(14553),g=t(54148),i=t(92745),f=t(6975),c=t(34999),m=t(23242),u=t(77256),h=t(57276),x=t(5358),C=t(88547),P=t(36826),l=t(16692),j=t(52161),y=t(74572),A=t(92221);const E=({contactPoint:o,alertmanagerName:a})=>{const[r,s]=(0,l.L7)(l.QI.UpdateContactPoint),e=!r||!s;return a===j.hY?(0,n.jsx)(A.a,{contactPoint:o,readOnly:e,editMode:!0}):(0,n.jsx)(y.B,{alertManagerSourceName:a,contactPoint:o,readOnly:e,editMode:!0})},F=()=>{const{selectedAlertmanager:o}=(0,x.VI)(),{name:a=""}=(0,g.g)(),r=decodeURIComponent(a),{isLoading:s,error:e,data:v}=(0,m.om)({name:r,alertmanager:o});return s?(0,n.jsx)(f._,{text:(0,i.t)("alerting.edit-contact-point.text-loading","Loading...")}):e?(0,n.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,u.JZ)(e)}):v?(0,n.jsx)(E,{alertmanagerName:o,contactPoint:v}):(0,n.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 N(){const{navId:o,pageNav:a}=(0,h.We)();return(0,n.jsx)(P.y,{navId:o,pageNav:a,accessType:"notification",children:(0,n.jsx)(F,{})})}const R=(0,C.S)(N)}}]);

//# sourceMappingURL=EditContactPoint-react19.61f23d22e7428230bca3.js.map