(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4502],{22814:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/notifications/digests/[id]",function(){return s(31363)}])},59849:function(e,t,s){"use strict";s.d(t,{Z:function(){return o}});var r=s(24246),i=s(36010),n=s(86677),a=s(88340);let c="/images/errors";var l=e=>{let{status:t}=e;return 404===t?(0,r.jsx)(i.Eep,{src:"".concat(c,"/404.svg"),alt:"Error 404",preview:!1}):500===t?(0,r.jsx)(i.Eep,{src:"".concat(c,"/500.svg"),alt:"Error 500",preview:!1}):(0,r.jsx)(i.Eep,{src:"".concat(c,"/unknown.svg"),alt:"Error Unknown",preview:!1})},d=s(812),o=e=>{let{error:t,defaultMessage:s="An unexpected error occurred.  Please try again",actions:c,showReload:o=!0}=e,u=(0,d.e$)(t,s),g="data"in t&&t.data?JSON.stringify(t.data):JSON.stringify(t),x="status"in t&&t.status?t.status:void 0,h=(0,n.useRouter)(),p=c&&c.length>0||o;return(0,r.jsx)(i.kCb,{vertical:!0,align:"center",justify:"center",className:"h-screen","data-testid":"error-page-result",children:(0,r.jsx)(i.x4B,{status:"error",icon:(0,r.jsx)(l,{status:x}),title:"Error ".concat(x),subTitle:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Typography.Paragraph,{type:"secondary",children:u}),(0,r.jsx)(i.kCb,{justify:"start",className:"max-w-96",children:(0,r.jsx)(i.UO1,{ghost:!0,size:"small",items:[{key:"1",label:"Show details",classNames:{header:"w-fit"},children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Typography.Text,{type:"secondary",children:g}),(0,r.jsx)(a.Z,{copyText:g})]})}]})})]}),extra:p&&(0,r.jsxs)(i.kCb,{gap:"small",justify:"center",children:[null==c?void 0:c.map((e,t)=>(0,r.jsx)(i.zxk,{...e,children:e.label},t)),o&&(0,r.jsx)(i.zxk,{onClick:()=>h.reload(),type:"primary",children:"Reload"})]})})})}},31363:function(e,t,s){"use strict";s.r(t);var r=s(24246),i=s(36010),n=s(86677),a=s(59849),c=s(77213),l=s(77830),d=s(58754),o=s(19904),u=s(4496),g=s(40822),x=s(96441);t.default=()=>{let e=(0,n.useRouter)(),{id:t}=e.query,{data:s,isLoading:h,error:p}=(0,g.nZ)({config_id:t},{skip:!t});return h?(0,r.jsx)(c.Z,{title:"Edit digest",children:(0,r.jsx)(i.TJV,{className:"flex justify-center py-12",children:(0,r.jsx)(i.Y6B,{})})}):p?(0,r.jsx)(a.Z,{error:p,defaultMessage:"A problem occurred while fetching the digest ".concat(t),actions:[{label:"Return to digests",onClick:()=>e.push(l.DN)}]}):(0,r.jsx)(c.Z,{title:"Edit digest",children:(0,r.jsx)(o.ZP,{scopes:[x.Sh.DIGEST_CONFIG_CREATE,x.Sh.DIGEST_CONFIG_UPDATE],children:(0,r.jsxs)(i.TJV,{"data-testid":"edit-digest-config",children:[(0,r.jsx)(d.Z,{heading:(null==s?void 0:s.name)||"Edit Digest Configuration",breadcrumbItems:[{title:"Digests",href:l.DN},{title:(null==s?void 0:s.name)||"Edit"}]}),(0,r.jsx)(u.Z,{initialValues:s?{id:s.id,name:s.name,digest_type:s.digest_type,enabled:s.enabled,messaging_service_type:s.messaging_service_type,cron_expression:s.cron_expression,timezone:s.timezone}:void 0,isLoading:h})]})})})}}},function(e){e.O(0,[8212,4496,2888,9774,179],function(){return e(e.s=22814)}),_N_E=e.O()}]);