"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2104],{65427:function(e,r,t){t.d(r,{Z:function(){return SubscribeToNewsletter}});var l=t(85893),a=t(5233);let SendIcon=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16.045",height:"16",viewBox:"0 0 16.045 16",...e,children:(0,l.jsx)("path",{id:"send",d:"M17.633,9.293,3.284,2.079a.849.849,0,0,0-1.2,1.042l2,5.371,9.138,1.523L4.086,11.538l-2,5.371a.812.812,0,0,0,1.2.962l14.349-7.214A.762.762,0,0,0,17.633,9.293Z",transform:"translate(-2.009 -1.994)",fill:"currentColor"})});var s=t(66644),n=t(16310),i=t(16974);let o=n.Ry().shape({email:n.Z_().email("error-email-format").required("error-email-required")});function SubscriptionForm(e){let{onSubmit:r,loading:t,success:n}=e,{t:d}=(0,a.$G)("common");return(0,l.jsx)("div",{className:"flex flex-col",children:(0,l.jsx)(s.l,{onSubmit:r,validationSchema:o,children:e=>{var r,a;let{register:s,formState:{errors:o}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"relative w-full rounded border border-gray-200 bg-gray-50 ltr:pr-11 rtl:pl-11",children:[(0,l.jsx)(i.Z,{...s("email"),type:"email",placeholder:d("contact-us-email-field"),inputClassName:"border-0 dark:focus:outline-none focus:outline-none focus:ring-0 ring-0",label:""}),(0,l.jsx)("button",{className:"absolute top-1/2 -mt-2 ltr:right-3 rtl:left-3",children:t?(0,l.jsx)("span",{className:"text-accent flex h-5 w-5 shrink-0 animate-spin rounded-full border-[3px] border-t-[3px] border-gray-300 ltr:ml-2 rtl:mr-2",style:{borderTopColor:"currentcolor"}}):(0,l.jsx)(SendIcon,{className:"hover:text-accent text-gray-500 transition-colors"})})]}),(null===(r=o.email)||void 0===r?void 0:r.message)&&(0,l.jsx)("span",{role:"alert",className:"block pt-2 text-xs text-warning",children:d(null===(a=o.email)||void 0===a?void 0:a.message)}),!t&&n&&(0,l.jsx)("div",{className:"mt-1 text-[13px]",children:(0,l.jsx)("span",{className:"text-accent",children:d("text-subscribe-successfully")})})]})}})})}var d=t(52324);function SubscribeToNewsletter(e){let{title:r,description:t}=e,{t:s}=(0,a.$G)("common"),{mutate:n,isLoading:i,isSubscribed:o}=(0,d.m)();return(0,l.jsxs)("div",{className:"flex flex-col",children:[r?(0,l.jsx)("h3",{className:"text-heading mt-3 mb-7 text-xl font-semibold",children:s(r)}):"",t?(0,l.jsx)("p",{className:"text-heading mb-7 text-sm",children:s(t)}):"",(0,l.jsx)(SubscriptionForm,{onSubmit:function(e){let{email:r}=e;n({email:r})},loading:i,success:o})]})}},52104:function(e,r,t){t.r(r);var l=t(85893),a=t(25675),s=t.n(a),n=t(45009),i=t(65427);r.default=()=>{let{data:{title:e,description:r}}=(0,n.X9)();return(0,l.jsxs)("div",{className:"relative h-full w-full overflow-hidden rounded-[10px] bg-light p-8 dark:bg-dark-500 md:h-auto md:min-h-0 md:max-w-2xl md:p-16 lg:w-screen lg:max-w-[56.25rem]",children:[(0,l.jsx)("div",{className:"mb-8",children:(0,l.jsx)(s(),{src:"/news-letter-icon.png",alt:"news letter icon",width:115,height:125,className:"mx-auto block"})}),(0,l.jsxs)("div",{className:"mb-8 text-center md:mb-16",children:[e?(0,l.jsx)("h2",{className:"mb-3 text-2xl font-bold text-dark dark:text-light md:text-4xl",children:e}):"",r?(0,l.jsx)("p",{className:"mx-auto max-w-xl text-sm font-medium md:text-lg md:leading-8",children:r}):""]}),(0,l.jsx)("div",{className:"mx-auto max-w-md",children:(0,l.jsx)(i.Z,{})})]})}},66644:function(e,r,t){t.d(r,{l:function(){return Form}});var l=t(85893),a=t(87536),s=t(47533),n=t(67294);let Form=e=>{let{onSubmit:r,children:t,useFormProps:i,validationSchema:o,serverError:d,resetFields:c,...m}=e,x=(0,a.cI)({...i,...o&&{resolver:(0,s.X)(o)}});return(0,n.useEffect)(()=>{d&&Object.entries(d).forEach(e=>{let[r,t]=e;x.setError(r,{type:"manual",message:t})})},[d,x]),(0,n.useEffect)(()=>{c&&x.reset(c)},[c,x]),(0,l.jsx)("form",{noValidate:!0,onSubmit:x.handleSubmit(r),...m,children:t(x)})}},16974:function(e,r,t){var l=t(85893),a=t(67294),s=t(93967),n=t.n(s),i=t(5233),o=t(98388);let d=(0,a.forwardRef)((e,r)=>{let{label:t,error:a,type:s="text",className:d,inputClassName:c="bg-transparent",...m}=e,{t:x}=(0,i.$G)("common");return(0,l.jsxs)("div",{className:d,children:[(0,l.jsxs)("label",{className:"block text-13px",children:[t&&(0,l.jsx)("span",{className:"block cursor-pointer pb-2.5 font-normal text-dark/70 rtl:text-right dark:text-light/70",children:x(t)}),(0,l.jsx)("input",{type:s,ref:r,...m,className:(0,o.m6)(n()("h-11 w-full appearance-none rounded border border-light-500 bg-transparent px-4 py-2 text-13px text-dark ring-[0.5px] ring-light-500 placeholder:text-dark-900 focus:border-brand focus:ring-[0.5px] focus:ring-brand dark:border-dark-600 dark:text-light dark:ring-dark-600 dark:placeholder:text-dark-700 dark:focus:border-brand dark:focus:ring-brand md:h-12 lg:px-5 xl:h-[50px]",c))})]}),a&&(0,l.jsx)("span",{role:"alert",className:"block pt-2 text-xs text-warning",children:x(a)})]})});d.displayName="Input",r.Z=d}}]);