1import{o as P,u as _,r as l,j as e,bW as I,aA as y,_ as N,$ as M,au as q,l as H,Y as L,at as F,ar as B}from"./index-CE18-tb0.js";import{u as U,t as Y}from"./zod-CeeCBlfz.js";import{P as O}from"./PageSeo-D0_bi3IH.js";import{S as R}from"./StaticPageLayout-Bql_8S5Q.js";import{M as W}from"./mail-8DRVYEWj.js";import{S as G}from"./send-CqBt4YVJ.js";import{o as K,s as h}from"./types-XO8cAsXJ.js";import"./vendor-Y7T1HomI.js";import"./supabase-BwgEV_BN.js";const Q=K({email:h().email("Please enter a valid email address"),subject:h().min(3,"Subject must be at least 3 characters").max(120,"Subject must be under 120 characters"),message:h().min(20,"Message should be at least 20 characters").max(2e3,"Message must be under 2000 characters")});function te(){const{user:c,profile:d,isLoading:f}=P(),{toast:b}=_(),[a,g]=l.useState(!1),[w,j]=l.useState(null),[S,v]=l.useState(0),k=()=>{j(null),v(t=>t+1)},n=l.useMemo(()=>({email:d?.contact_email||c?.email||"",subject:"",message:""}),[c?.email,d?.contact_email]),{register:m,handleSubmit:C,formState:{errors:s},reset:u}=U({resolver:Y(Q),defaultValues:n});l.useEffect(()=>{u(n)},[n,u]);const E=async t=>{try{g(!0);const x=async r=>{const o=r?.context;if(!o)return null;try{if(typeof o.clone=="function")return await o.clone().json();if(typeof o.json=="function")return await o.json()}catch{}return null},T=!!y.TURNSTILE_SITE_KEY,p=(w||"").trim();if(T&&!p)throw new Error("Please complete the CAPTCHA to continue.");const A={email:t.email,subject:t.subject,message:t.message,user_id:c?.id??null,profile_id:d?.id??null,source:"contact_page",fingerprint:await F().catch(()=>null)},{error:i}=await B.functions.invoke("send-support-email",{body:{...A,captchaToken:p||null}});if(p&&k(),i){console.error("Support email error",i);const r=await x(i);throw r?.error==="captcha_required"||r?.error==="captcha_failed"?new Error(r?.message||"CAPTCHA verification failed."):i}b({title:"Message sent",description:"Thanks for reaching out. We respond within 12 hours."}),u(n)}catch(x){b({title:"Could not send message",description:x?.message||"Please try again later.",variant:"destructive"})}finally{g(!1)}};return e.jsxs(R,{containerClassName:"max-w-3xl mx-auto px-6 py-12",children:[e.jsx(O,{title:"Contact CyberStock â Support & Sales",description:"Get in touch with the CyberStock team for support, billing questions, partnerships or feedback about our AI keywording tools for stock contributors.",path:"/contact"}),e.jsxs("div",{className:"flex flex-col gap-10",children:[e.jsxs("header",{className:"space-y-4",children:[e.jsx("h1",{className:"text-3xl font-bold",children:"Contact Cyberstock"}),e.jsx("p",{className:"text-muted-foreground max-w-2xl",children:"Have a question, feature idea, or need help with your account? Drop us a note and we�ll reply fast. Our support hours run 08:00�23:00 PST, seven days a week."}),e.jsxs("div",{className:"flex flex-wrap gap-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full bg-muted px-4 py-2",children:[e.jsx(W,{className:"w-4 h-4"})," support [at] cyberstock [dot] lol"]}),e.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full bg-muted px-4 py-2",children:[e.jsx(I,{className:"w-4 h-4"})," Average response under 12h"]})]})]}),e.jsxs("div",{className:"rounded-3xl border border-border bg-card/80 backdrop-blur-sm shadow-sm p-8",children:[e.jsx("h2",{className:"text-xl font-semibold mb-6",children:"Send us a message"}),e.jsxs("form",{className:"space-y-6",onSubmit:C(E),children:[e.jsxs("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:[e.jsxs("label",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-sm font-medium text-foreground",children:"Email"}),e.jsx(N,{type:"email",placeholder:"[email protected]",disabled:f||a,...m("email")}),s.email&&e.jsx("span",{className:"text-xs text-destructive",children:s.email.message}),c?.email&&!f&&e.jsx("span",{className:"text-xs text-muted-foreground",children:"Prefilled from your account. Edit if you prefer another inbox."})]}),e.jsxs("label",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-sm font-medium text-foreground",children:"Subject"}),e.jsx(N,{type:"text",placeholder:"How can we help?",disabled:a,...m("subject")}),s.subject&&e.jsx("span",{className:"text-xs text-destructive",children:s.subject.message})]})]}),e.jsxs("label",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-sm font-medium text-foreground",children:"Message"}),e.jsx(M,{rows:6,placeholder:"Share as much detail as you can so we can help quickly.",disabled:a,...m("message")}),s.message&&e.jsx("span",{className:"text-xs text-destructive",children:s.message.message})]}),y.TURNSTILE_SITE_KEY&&e.jsx(q,{onToken:j,allowBypass:!1},S),e.jsx("div",{className:"flex justify-end",children:e.jsx(H,{type:"submit",disabled:a,size:"lg",className:"min-w-[200px] justify-center",children:a?e.jsxs(e.Fragment,{children:[e.jsx(L,{className:"mr-2 h-4 w-4 animate-spin"})," Sending..."]}):"Send message"})})]})]}),e.jsxs("section",{className:"space-y-3",children:[e.jsx("h2",{className:"text-xl font-semibold",children:"FAQ"}),e.jsxs("div",{className:"rounded-2xl border border-border bg-card/70 p-6",children:[e.jsx("h3",{className:"text-base font-semibold text-foreground",children:"Is it really 1 file = 1 credit?"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Yes. CyberStock uses 1 credit per file to generate metadata (title + description + keywords). If you choose to push that file via CyberPusher, it costs 1 additional credit per fileâno matter how many platforms you select."})]})]}),e.jsxs("section",{className:"space-y-6",children:[e.jsxs("div",{className:"rounded-2xl border border-border bg-muted/40 p-6 flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"space-y-2 text-sm text-muted-foreground",children:[e.jsx("h3",{className:"text-base font-semibold text-foreground",children:"Prefer Telegram?"}),e.jsx("p",{className:"max-w-md",children:"Join the Cyberstock creator community for release updates, metadata tips, and direct Q&A with the team."})]}),e.jsxs("a",{href:"https://t.me/cyberstockai",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-full bg-[#27A7E7]/90 hover:bg-[#27A7E7] text-white px-4 py-2 text-sm font-medium transition focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[#27A7E7]/70",children:[e.jsx(G,{className:"w-3.5 h-3.5"})," Chat on Telegram"]})]}),e.jsxs("div",{className:"rounded-2xl border border-border bg-card/70 p-6",children:[e.jsx("h3",{className:"text-base font-semibold text-foreground mb-2",children:"Headquarters"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["1968 S Coast Hwy, STE 1543",e.jsx("br",{}),"Laguna Beach, CA, USA"]})]})]}),e.jsxs("section",{className:"space-y-6",children:[e.jsx("h2",{className:"text-xl font-semibold",children:"Other ways to reach us"}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"rounded-2xl border border-border bg-card p-5",children:[e.jsx("h3",{className:"text-base font-semibold text-foreground mb-2",children:"Email"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"support [at] cyberstock [dot] lol"})]}),e.jsxs("div",{className:"rounded-2xl border border-border bg-card p-5",children:[e.jsx("h3",{className:"text-base font-semibold text-foreground mb-2",children:"Support hours"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"08:00�23:00 PST, 7 days a week"})]})]})]})]})]})}export{te as default};
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.