(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[77],{91971:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/notifications/providers/[key]",function(){return t(75474)}])},59849:function(e,r,t){"use strict";t.d(r,{Z:function(){return d}});var s=t(24246),n=t(36010),i=t(86677),a=t(88340);let c="/images/errors";var l=e=>{let{status:r}=e;return 404===r?(0,s.jsx)(n.Eep,{src:"".concat(c,"/404.svg"),alt:"Error 404",preview:!1}):500===r?(0,s.jsx)(n.Eep,{src:"".concat(c,"/500.svg"),alt:"Error 500",preview:!1}):(0,s.jsx)(n.Eep,{src:"".concat(c,"/unknown.svg"),alt:"Error Unknown",preview:!1})},o=t(812),d=e=>{let{error:r,defaultMessage:t="An unexpected error occurred.  Please try again",actions:c,showReload:d=!0}=e,u=(0,o.e$)(r,t),x="data"in r&&r.data?JSON.stringify(r.data):JSON.stringify(r),g="status"in r&&r.status?r.status:void 0,h=(0,i.useRouter)(),p=c&&c.length>0||d;return(0,s.jsx)(n.kCb,{vertical:!0,align:"center",justify:"center",className:"h-screen","data-testid":"error-page-result",children:(0,s.jsx)(n.x4B,{status:"error",icon:(0,s.jsx)(l,{status:g}),title:"Error ".concat(g),subTitle:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.Typography.Paragraph,{type:"secondary",children:u}),(0,s.jsx)(n.kCb,{justify:"start",className:"max-w-96",children:(0,s.jsx)(n.UO1,{ghost:!0,size:"small",items:[{key:"1",label:"Show details",classNames:{header:"w-fit"},children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.Typography.Text,{type:"secondary",children:x}),(0,s.jsx)(a.Z,{copyText:x})]})}]})})]}),extra:p&&(0,s.jsxs)(n.kCb,{gap:"small",justify:"center",children:[null==c?void 0:c.map((e,r)=>(0,s.jsx)(n.zxk,{...e,children:e.label},r)),d&&(0,s.jsx)(n.zxk,{onClick:()=>h.reload(),type:"primary",children:"Reload"})]})})})}},75474:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return h}});var s=t(24246),n=t(86677),i=t(59849),a=t(77213),c=t(90980),l=t(77830),o=t(36010),d=t(90710),u=t(42478),x=t(10792);let g=e=>{let{configKey:r}=e,{data:t,isLoading:n}=(0,u.FU)({key:r});if(n)return(0,s.jsx)(o.TJV,{display:"flex",justifyContent:"center",alignItems:"center",height:"200px",children:(0,s.jsx)(o.Y6B,{})});let i=t.service_type;return(0,s.jsxs)(o.TJV,{children:[(0,s.jsx)(o.y_b,{fontSize:"2xl",fontWeight:"semibold",mb:6,children:"Edit messaging provider"}),Object.values(d.q).includes(i)?(0,s.jsx)(x.Z,{configKey:r,initialProviderType:i}):(0,s.jsxs)(o.Bjg,{color:"red.500",children:["Unsupported service type: ",i]})]})};var h=()=>{let e=(0,n.useRouter)(),{key:r}=e.query,{error:t}=(0,u.FU)({key:r});return t?(0,s.jsx)(i.Z,{error:t,defaultMessage:"A problem occurred while fetching the messaging configuration for key ".concat(r),actions:[{label:"Return to messaging providers",onClick:()=>e.push(l.AD)}]}):r&&"string"==typeof r?(0,s.jsxs)(a.Z,{title:"Edit Messaging Provider - ".concat(r),children:[(0,s.jsx)(c.Z,{backPath:l.AD}),(0,s.jsx)(g,{configKey:r})]}):(0,s.jsxs)(a.Z,{title:"Edit Messaging Provider",children:[(0,s.jsx)(c.Z,{backPath:l.AD}),(0,s.jsx)("div",{children:"Invalid messaging provider key"})]})}}},function(e){e.O(0,[431,6394,7245,3377,2888,9774,179],function(){return e(e.s=91971)}),_N_E=e.O()}]);