1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2444],{18372:(e,s,r)=>{"use strict";r.r(s),r.d(s,{__N_SSP:()=>c,default:()=>u});var l=r(37876),a=r(61875),i=r(14232),t=r(77328),n=r.n(t),d=r(95364),o=r(57918),c=!0;function u(e){let s=e.seller,[r,t]=(0,i.useState)(!1);return(0,l.jsxs)(d.Ay,{...e,hideNav:!0,children:[(0,l.jsx)(n(),{children:(0,l.jsxs)("title",{children:["Contact ",s.name]})}),(0,l.jsxs)(a.Av,{children:["Contact ",s.name]}),(0,l.jsx)("div",{className:"w-full h-full md:h-auto md:w-[800px] p-10 ",children:r?(0,l.jsxs)("div",{children:["Thanks, your message has been sent to ",s.name]}):(0,l.jsx)(o.A,{seller:s,...e,onComplete:e=>void t(!0)})})]})}},23580:(e,s,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/contact-seller",function(){return r(18372)}])},57918:(e,s,r)=>{"use strict";r.d(s,{A:()=>c});var l=r(37876),a=r(61875),i=r(96415),t=r(88992),n=r(91408),d=r(19512),o=r(11613);function c({seller:e,onComplete:s=e=>{}}){let r=n.Ik().shape({email:n.Yj().required("Email is required"),name:n.Yj().required("Name is required"),e_subject:n.Yj().required("Subject is required"),e_message:n.Yj().required("Message is required")}),u={resolver:(0,i.t)(r)},{register:m,handleSubmit:j,watch:h,reset:f,setValue:g,formState:w,control:_}=(0,t.mN)(u),{errors:b}=w;h();let x=async function(r){r.sellerId=e.id;try{let l=await fetch("/api/seller/contact",{headers:{"Content-Type":"application/json"},method:"PUT",body:JSON.stringify(r)}),a=l.status,i=await l.json();if(a>=400)return void(0,o.UG)(`Error sending message: ${i.error}`);(0,o.VX)(`Thank you for your message to ${e.name}.`),s(i)}catch(e){console.log("Failed to submit message",e.message),(0,o.UG)("Failed to submit: "+e.message)}};return(0,l.jsx)("div",{children:(0,l.jsxs)("div",{className:"w-full child:mt-4",children:[(0,l.jsx)(a.L0,{className:"w-full",errors:b,field:"email",placeholder:"Email",register:m,label:"Your email"}),(0,l.jsx)(a.Kw,{field:"email",errors:b}),(0,l.jsx)(a.L0,{className:"w-full",errors:b,field:"name",placeholder:"Name",register:m,label:"Your name"}),(0,l.jsx)(a.Kw,{field:"name",errors:b}),(0,l.jsx)(a.L0,{className:"w-full",errors:b,field:"e_subject",label:"Subject",placeholder:"Subject",register:m}),(0,l.jsx)(a.Kw,{field:"e_subject",errors:b}),(0,l.jsx)(a.L0,{className:"w-full",errors:b,field:"e_message",placeholder:"Message",label:"Message",register:m,multiline:!0,rows:10,maxRows:8}),(0,l.jsx)(a.Kw,{field:"e_message",errors:b}),(0,l.jsx)(d.A,{component:"label",variant:"contained",disabled:w.isSubmitting,onClick:j(x),children:w.isSubmitting?"Sending...":"Send message"})]})})}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=23580)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.