1import{j as e}from"./vendor-motion-D7sMjYTa.js";import{r as l}from"./vendor-react-CwheQSm5.js";import{d as j,B as y,s as C}from"./index-DGMfjGa9.js";import{I as h,T as N}from"./textarea-Bgp8ADsq.js";import{o as k,s as m}from"./schemas-C4vPL8mw.js";const w=k({name:m().trim().min(1,{message:"×©× ××× ×©×× ××××"}).max(100,{message:"××©× ×××× ××××ת ×¢× 100 ת××××"}),email:m().trim().email({message:"×ת××ת ×××××× ×× ×ª×§×× ×"}).max(255,{message:"×××××× ×××× ××××ת ×¢× 255 ת××××"}),phone:m().trim().max(20,{message:"××פ×× ×××× ××××ת ×¢× 20 ת××××"}).optional(),message:m().trim().min(1,{message:"××××¢× ××× ×©×× ××××"}).max(2e3,{message:"×××××¢× ××××ת ××××ת ×¢× 2000 ת××××"})}),D=()=>{const[s,x]=l.useState({name:"",email:"",phone:"",message:""}),[c,g]=l.useState(!1),[b,u]=l.useState(!1),[d,r]=l.useState(!1),{toast:n}=j(),i=t=>{const{name:a,value:p}=t.target;x(o=>({...o,[a]:p}))},f=async t=>{t.preventDefault(),r(!0);try{if(!c){n({title:"ש×××× ×××פס",description:"×ש ××שר ×ת ×ª× ×× ×ש×××ש ××××× ××ת ×פר×××ת",variant:"destructive"}),r(!1);return}const a=w.safeParse(s);if(!a.success){const v=a.error.issues[0];n({title:"ש×××× ×××פס",description:v.message,variant:"destructive"}),r(!1);return}const{data:p,error:o}=await C.functions.invoke("contact-submission",{body:{...a.data,form_source:"general",service_consent:c,marketing_consent:b,page_url:typeof window<"u"?window.location.href:void 0}});if(o)throw o;n({title:"××××¢× × ×©××× ××צ×××",description:"ת××× ×¢× ×¤× ××ת×! ××××ר ×××× ×××§×× ××פשר×."}),x({name:"",email:"",phone:"",message:""}),g(!1),u(!1)}catch(a){console.error("Error submitting form:",a),n({title:"ש×××× ×ש×××ת ×××××¢×",description:(a==null?void 0:a.message)||"×× × × ×¡× ×©×× ×× ×¦×ר קשר ×××פ××",variant:"destructive"})}finally{r(!1)}};return e.jsxs("form",{onSubmit:f,className:"space-y-8",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"name",className:"block text-sm font-semibold text-brand-text-light mb-2 text-right",children:"×©× ×××"}),e.jsx(h,{id:"name",name:"name",value:s.name,onChange:i,required:!0,placeholder:"××× ×¡/× ×ת ש×× ××××","aria-label":"×©× ××× (ש×× ××××)","aria-describedby":"name-help",autoComplete:"off"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"email",className:"block text-sm font-semibold text-brand-text-light mb-2 text-right",children:'×××"×'}),e.jsx(h,{id:"email",name:"email",type:"email",value:s.email,onChange:i,required:!0,placeholder:"××× ×¡/× ×ת ×ת××ת ×××××´× ×©××","aria-label":"×ת××ת ×××××× (ש×× ××××)","aria-describedby":"email-help",autoComplete:"off"})]})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"phone",className:"block text-sm font-semibold text-brand-text-light mb-2 text-right",children:"××פ××"}),e.jsx(h,{id:"phone",name:"phone",type:"tel",value:s.phone,onChange:i,placeholder:"××× ×¡/× ×ת ×ספר ×××פ×× ×©××","aria-label":"×ספר ××פ×× (ש×× ××פצ××× ××)","aria-describedby":"phone-help",autoComplete:"off"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"message",className:"block text-sm font-semibold text-brand-text-light mb-2 text-right",children:"××××¢×"}),e.jsx(N,{id:"message",name:"message",rows:5,value:s.message,onChange:i,required:!0,placeholder:"×ת××/× ×ת ××××¢×ª× ×××","aria-label":"××××¢× ×× ×¤×ר×× ×פר×××§× (ש×× ××××)","aria-describedby":"message-help"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("input",{id:"serviceConsent",type:"checkbox",checked:c,onChange:t=>g(t.target.checked),className:"mt-1 h-4 w-4 rounded border-white/20 text-brand-orange focus:ring-brand-orange flex-shrink-0",required:!0}),e.jsxs("label",{htmlFor:"serviceConsent",className:"text-sm text-brand-text-muted leading-relaxed text-right cursor-pointer",children:["×× × ××שר/ת ×ת"," ",e.jsx("a",{href:"/terms-of-service",className:"text-brand-orange hover:text-brand-orange-hover underline",children:"×ª× ×× ×ש×××ש"})," ","×",e.jsx("a",{href:"/privacy-policy",className:"text-brand-orange hover:text-brand-orange-hover underline",children:"×××× ××ת ×פר×××ת"}),". ",e.jsx("span",{className:"text-brand-orange",children:"*"})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("input",{id:"marketingConsent",type:"checkbox",checked:b,onChange:t=>
1u(t.target.checked),className:"mt-1 h-4 w-4 rounded border-white/20 text-brand-orange focus:ring-brand-orange flex-shrink-0"}),e.jsx("label",{htmlFor:"marketingConsent",className:"text-sm text-brand-text-muted leading-relaxed text-right cursor-pointer",children:"×× × ×¨××¦× ××צ×רף ××§×××ת ×-Agent Era ×××§×× ×¢×××× ××, ××××ת ×ת×× ×× ×××¢×××× ×××××."})]})]}),e.jsx(y,{type:"submit",disabled:d,className:"w-full bg-brand-orange hover:bg-brand-orange-hover text-white font-bold shadow-lg shadow-brand-orange/25 transition-colors duration-200","aria-label":d?"ש××× ××××¢×, ×× × ××ת×":"ש×× ××××¢× ×¢×ש××",children:d?"ש×××/ת...":"ש××/× ××××¢×"}),e.jsxs("p",{className:"text-center text-[11px] leading-relaxed mt-2",style:{color:"rgba(168,155,140,0.6)"},children:["×××××¢ × ×סף ×××רת ××¢× × ×××ª× ×©×ר×ת ××××. ש×××ת ×××פס ××××× ×ס××× ×",e.jsx("a",{href:"/privacy-policy",className:"underline hover:text-brand-orange transition-colors",style:{color:"rgba(255,107,53,0.7)"},children:"×××× ××ת ×פר×××ת"})," ","ש×× ×."]})]})};export{D as C};
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.