1import{r as i,j as e}from"./react-KUqb6K77.js";import{W as N,X as p,a2 as F,a4 as T}from"./vendor-CNhjjJLh.js";import{G}from"./GuestLayout-CkDK9HVA.js";import{B as g}from"./button-C7jjpaJ7.js";import{C as w,d as C,a as E,b as M,c as V}from"./card-SfIl50_p.js";import{I as d}from"./input-DcIKAMe3.js";import{L as n}from"./label-oEoXG4Jr.js";import{T as I}from"./textarea-CDX9Y1j2.js";import{a as R}from"./appUrl-BJZg8jDK.js";import{M as H,c as P,C as U,y as Y,L as k,l as A}from"./icons-D1-x5PX5.js";import"./SiteLogo-D5aIA_Te.js";import"./useTranslation-D07l7s8-.js";import"./dropdown-menu-CvOHBeL3.js";import"./ui-D-atVqU9.js";import"./utils-DAKl9igb.js";import"./sheet-CqopPqKj.js";import"./useFlashMessages-DULjt7lO.js";import"./avatar-_LnhjI80.js";import"./AdSlot-CCY4kMqj.js";import"./app-B5N4olsZ.js";import"./bootstrap-CX_mNHCw.js";/* empty css */import"./dialog-D_Zwkt5-.js";import"./switch-PO6QCVWf.js";import"./RightSidebarFooter-Cm7A6_NW.js";const q={name:"",email:"",category:"general",subject:"",message:"",privacy_acknowledged:!1,captcha_token:"",captcha_answer:"",website:""};function B({seo:l}){const[s,h]=i.useState(q),[j,S]=i.useState(null),[m,v]=i.useState(!1),[f,y]=i.useState(!1),[_,b]=i.useState(!1),[t,u]=i.useState({}),o=i.useCallback(async()=>{v(!0);try{const{data:a}=await N.get("/api/contact/captcha");S(a),h(c=>({...c,captcha_token:a.token,captcha_answer:""}))}catch{p.error("Could not load the security question.")}finally{v(!1)}},[]);i.useEffect(()=>{o()},[o]);const r=(a,c)=>{h(x=>({...x,[a]:c})),u(x=>({...x,[a]:void 0}))},L=async a=>{a.preventDefault(),y(!0),u({});try{await N.post("/api/contact",s),b(!0),h(q),p.success("Your message was received.")}catch(c){u(c.response?.data?.errors||{}),p.error(c.response?.data?.message||"Could not send your message."),o()}finally{y(!1)}};return e.jsxs(e.Fragment,{children:[e.jsxs(F,{title:l.title,children:[e.jsx("meta",{name:"description",content:l.description}),e.jsx("link",{rel:"canonical",href:l.canonical})]}),e.jsx("main",{className:"min-h-screen bg-muted/20 py-12",children:e.jsxs("div",{className:"container mx-auto grid max-w-6xl gap-8 px-4 lg:grid-cols-[0.8fr_1.2fr]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"inline-flex items-center gap-2 text-sm font-semibold text-primary",children:[e.jsx(H,{className:"h-4 w-4"}),"Contact Globe TV"]}),e.jsx("h1",{className:"mt-3 text-4xl font-black tracking-tight sm:text-5xl",children:"How can we help?"}),e.jsx("p",{className:"mt-4 text-lg leading-relaxed text-muted-foreground",children:"Use this form for corrections, privacy requests, removal requests concerning streams, articles or images, technical issues, advertising and general enquiries."})]}),e.jsx(w,{children:e.jsxs(C,{className:"space-y-4 p-5 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex gap-3",children:[e.jsx(P,{className:"mt-0.5 h-5 w-5 shrink-0 text-primary"}),e.jsx("p",{children:"Your email address is used only to review and respond to this message. Globe TV does not offer public account registration or marketing mailing lists."})]}),e.jsx("p",{children:"For removal requests, include the exact Globe TV URL, the material concerned, your relationship to it and enough information for us to verify the request."}),e.jsx("p",{children:"Submitting a request does not guarantee removal, but requests are reviewed in good faith and legitimate issues can be resolved without unnecessary delay."})]})})]}),e.jsxs(w,{children:[e.jsxs(E,{children:[e.jsx(M,{children:"Send a message"}),e.jsx(V,{children:"Messages are stored securely in the Globe TV administration panel. Email forwarding is currently disabled unless configured by the administrator."})]}),e.jsx(C,{children:_?e.jsxs("div",{className:"flex min-h-96 flex-col items-center justify-center text-center",children:[e.jsx(U,{className:"h-14 w-14 text-emerald-500"}),e.jsx("h2",{className:"mt-4 text-2xl font-bold",children:"Message received"}),e.jsx("p",{className:"mt-2 max-w-md text-muted-foreground",children:"Thank you. Your message is available to the Globe TV administrator for review."}),e.jsx(g,{className:"mt-6",variant:"outline",onClick:()=>{b(!1),o()},children:"Send another message"})]}):e.jsxs("form",{onSubmit:L,className:"space-y-5",children:[e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs(n,{htmlFor:"contact-name",children:["Name ",e.jsx("span",{className:"text-muted-foreground",children:"(optional)"})]}),e.jsx(d,{id:"contact-name",value:s.name,onChange:a=>r("name",a.target.value),maxLength:120})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(n,{htmlFor:"contact-email",children:"Email address"}),e.jsx(d,{id:"contact-email",type:"email",required:!0,value:s.email,onChange:a=>r("email",a.target.value)}),t.email&&e.jsx("p",{className:"text-xs text-destructive",children:t.email[0]})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(n,{htmlFor:"contact-category",children:"Request type"}),e.jsxs("select",{id:"contact-category",value:s.category,onChange:a=>r("category",a.target.value),className:"h-10 w-full rounded-md border bg-background px-3 text-sm",children:[e.jsx("option",{value:"general",children:"General enquiry"}),e.jsx("option",{value:"editorial",children:"Editorial enquiry"}),e.jsx("option",{value:"correction",children:"Correction or clarification"}),e.jsx("option",{value:"removal",children:"Stream, article or image removal"}),e.jsx("option",{value:"privacy",children:"Privacy or data rights"}),e.jsx("option",{value:"advertising",children:"Advertising"}),e.jsx("option",{value:"technical",children:"Technical issue"}),e.jsx("option",{value:"other",children:"Other"})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(n,{htmlFor:"contact-subject",children:"Subject"}),e.jsx(d,{id:"contact-subject",required:!0,minLength:4,maxLength:180,value:s.subject,onChange:a=>r("subject",a.target.value)}),t.subject&&e.jsx("p",{className:"text-xs text-destructive",children:t.subject[0]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(n,{htmlFor:"contact-message",children:"Message"}),e.jsx(I,{id:"contact-message",required:!0,minLength:20,maxLength:5e3,className:"min-h-40",value:s.message,onChange:a=>r("message",a.target.value)}),t.message&&e.jsx("p",{className:"text-xs text-destructive",children:t.message[0]})]}),e.jsxs("div",{className:"hidden","aria-hidden":"true",children:[e.jsx(n,{htmlFor:"contact-website",children:"Website"}),e.jsx(d,{id:"contact-website",tabIndex:-1,autoComplete:"off",value:s.website,onChange:a=>r("website",a.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(n,{htmlFor:"contact-captcha",children:"Security question"}),e.jsxs(g,{type:"button",variant:"ghost",size:"sm",onClick:o,disabled:m,children:[e.jsx(Y,{className:`mr-2 h-3.5 w-3.5 ${m?"animate-spin":""}`}),"New question"]})]}),e.jsxs("div",{className:"grid grid-cols-[1fr_140px] gap-3",children:[e.jsx("div",{className:"flex items-center justify-center rounded-md border bg-muted px-4 font-semibold",children:m?e.jsx(k,{className:"h-5 w-5 animate-spin"}):j?.question}),e.jsx(d,{id:"contact-captcha",inputMode:"numeric",required:!0,value:s.captcha_answer,onChange:a=>r("captcha_answer",a.target.value),placeholder:"Answer"})]}),t.captcha_answer&&e.jsx("p",{className:"text-xs text-destructive",children:t.captcha_answer[0]})]}),e.jsxs("label",{className:"flex items-start gap-3 text-sm",children:[e.jsx("input",{type:"checkbox",className:"mt-1 h-4 w-4",required:!0,checked:s.privacy_acknowledged,onChange:a=>r("privacy_acknowledged",a.target.checked)}),e.jsxs("span",{children:["I have read the ",e.jsx(T,{href:R("/privacy-policy"),className:"text-primary hover:underline",children:"Privacy Policy"})," and understand that my details will be used to handle this request."]})]}),e.jsxs(g,{type:"submit",className:"w-full",disabled:f||m||!j,children:[f?e.jsx(k,{className:"mr-2 h-4 w-4 animate-spin"}):e.jsx(A,{className:"mr-2 h-4 w-4"}),"Send message"]})]})})]})]})})]})}B.layout=l=>e.jsx(G,{children:l});export{B 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.