(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8161],{23321:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/properties/[id]",function(){return t(56041)}])},59849:function(e,r,t){"use strict";t.d(r,{Z:function(){return u}});var s=t(24246),n=t(36010),a=t(86677),i=t(88340);let l="/images/errors";var c=e=>{let{status:r}=e;return 404===r?(0,s.jsx)(n.Eep,{src:"".concat(l,"/404.svg"),alt:"Error 404",preview:!1}):500===r?(0,s.jsx)(n.Eep,{src:"".concat(l,"/500.svg"),alt:"Error 500",preview:!1}):(0,s.jsx)(n.Eep,{src:"".concat(l,"/unknown.svg"),alt:"Error Unknown",preview:!1})},o=t(812),u=e=>{let{error:r,defaultMessage:t="An unexpected error occurred.  Please try again",actions:l,showReload:u=!0}=e,d=(0,o.e$)(r,t),p="data"in r&&r.data?JSON.stringify(r.data):JSON.stringify(r),h="status"in r&&r.status?r.status:void 0,x=(0,a.useRouter)(),y=l&&l.length>0||u;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)(c,{status:h}),title:"Error ".concat(h),subTitle:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.Typography.Paragraph,{type:"secondary",children:d}),(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:p}),(0,s.jsx)(i.Z,{copyText:p})]})}]})})]}),extra:y&&(0,s.jsxs)(n.kCb,{gap:"small",justify:"center",children:[null==l?void 0:l.map((e,r)=>(0,s.jsx)(n.zxk,{...e,children:e.label},r)),u&&(0,s.jsx)(n.zxk,{onClick:()=>x.reload(),type:"primary",children:"Reload"})]})})})}},56041:function(e,r,t){"use strict";t.r(r);var s=t(24246),n=t(36010),a=t(86677),i=t(59849),l=t(812),c=t(77213),o=t(77830),u=t(58754),d=t(46628),p=t(98795),h=t(18880),x=t(31883);r.default=()=>{var e,r;let t=(0,n.p8r)(),{id:y}=(0,a.useRouter)().query,{data:j,error:f}=(0,p.J6)(y),[g]=(0,p.f2)(),m=async e=>{let{id:r,messaging_templates:s,...n}=e,a=await g({id:r,property:n});if((0,x.D4)(a)){t((0,d.Vo)((0,l.e$)(a.error)));return}t((0,d.t5)("Property ".concat(e.name," updated successfully")))};return f?(0,s.jsx)(i.Z,{error:f,defaultMessage:"A problem occurred while fetching the property"}):(0,s.jsxs)(c.Z,{title:null!==(e=null==j?void 0:j.name)&&void 0!==e?e:"Property",children:[(0,s.jsx)(u.Z,{heading:"Properties",breadcrumbItems:[{title:"All properties",href:o.ru},{title:null!==(r=null==j?void 0:j.name)&&void 0!==r?r:"Property"}]}),(0,s.jsx)(n.TJV,{maxWidth:"720px",children:(0,s.jsx)(h.Z,{property:j,handleSubmit:m})})]})}}},function(e){e.O(0,[787,2888,9774,179],function(){return e(e.s=23321)}),_N_E=e.O()}]);