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

//# sourceMappingURL=EditContactPoint.69eb06ed6a0bfcd8c2b8.js.map