import{r as o,j as e}from"./vendor-react-DgEFbQIi.js";import{u as g}from"./useDocumentTitle-M5i8wF4-.js";import{aZ as y,T as j}from"./index-DFVuS8SP.js";import{H as x}from"./HelpCenterLayout-DixgH0WP.js";import{S as v}from"./SubmissionSuccess-B22HIbGm.js";import{H as N}from"./HeroBanner-CCPLhH1N.js";import{S as l}from"./support-BT2WeAbE.js";import{a as F}from"./supportSubmissions-Dnt2EG69.js";import{S as w}from"./shield-C1NFLCbG.js";import{S}from"./send-CbUVXki9.js";import"./vendor-radix-kdo0k_bv.js";import"./vendor-amplify-BBi2B1tW.js";import"./vendor-motion-CzLrDd6y.js";import"./vendor-maps-bOuA10hf.js";import"./PageBreadcrumb-nCACiN0q.js";import"./trending-up-CPKYlz4V.js";import"./book-open-BePocOnz.js";import"./dollar-sign-Cz68EQu2.js";import"./credit-card-Cc_cW3L8.js";import"./circle-check-DeY5-glE.js";const k={name:"",email:"",category:"",description:"",profileUrl:"",listingUrl:"",conversationId:"",dateOfIncident:""},B=[{value:"profile",label:"Report a Profile"},{value:"listing",label:"Report a Listing or Service"},{value:"message",label:"Report a Message"},{value:"other",label:"Other"}];function Z(){g("Report a Concern");const[t,p]=o.useState(k),[i,d]=o.useState(!1),[m,h]=o.useState(null),[c,n]=o.useState(null),r=s=>{p(a=>({...a,[s.target.name]:s.target.value}))},f=async s=>{s.preventDefault(),n(null);const a=F(t);if(a.ok===!1){n(a.error);return}d(!0);try{const u=await fetch(j("/support/report"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a.value)});if(!u.ok)throw new Error("Failed to submit");const b=await u.json();h(b.ticketId)}catch{n(`Something went wrong. Please try again or email us directly at ${l}.`)}finally{d(!1)}};return m?e.jsx(x,{hideRoleTabs:!0,children:e.jsx(v,{title:"Report Submitted",message:"Thank you for helping keep PLEC safe. Our team will review your report and follow up if needed.",ticketId:m,children:e.jsxs("p",{className:"text-[#4B4B4B] text-sm mt-4",children:["All reports are kept confidential. If you have additional information, contact us at"," ",e.jsx("a",{href:`mailto:${l}`,className:"text-brand-400 hover:underline font-medium",children:l})," ","and reference your ticket ID."]})})}):e.jsxs(x,{hideRoleTabs:!0,children:[e.jsx(N,{icon:w,title:"Report a Concern",subtitle:"If you've experienced or witnessed something that violates our Community Guidelines, please let us know.",className:"rounded-2xl px-6 md:px-12 mb-12"}),e.jsxs("div",{className:"max-w-3xl mx-auto",children:[e.jsxs("div",{className:"flex items-start gap-3 bg-amber-50 border-l-4 border-amber-500 rounded-r-xl p-4 mb-8 shadow-sm",children:[e.jsx(y,{className:"w-5 h-5 text-amber-600 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-amber-900 text-sm leading-relaxed",children:"If you are in immediate danger, please contact your local emergency services (911). This form is for non-emergency reports about platform activity."})]}),e.jsxs("form",{onSubmit:f,className:"space-y-5",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-5",children:[e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"name",className:"block text-sm font-medium text-[#0F0F0F] mb-1.5",children:["Your Name ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{id:"name",name:"name",type:"text",required:!0,maxLength:200,value:t.name,onChange:r,className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl text-sm focus:outline-none focus:border-brand-400 transition-colors",placeholder:"Your full name"})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"email",className:"block text-sm font-medium text-[#0F0F0F] mb-1.5",children:["Your Email ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{id:"email",name:"email",type:"email",required:!0,maxLength:254,value:t.email,onChange:r,className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl text-sm focus:outline-none focus:border-brand-400 transition-colors",placeholder:"you@example.com"})]})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"category",className:"block text-sm font-medium text-[#0F0F0F] mb-1.5",children:["What are you reporting? ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs("select",{id:"category",name:"category",required:!0,value:t.category,onChange:r,className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl text-sm focus:outline-none focus:border-brand-400 transition-colors bg-white",children:[e.jsx("option",{value:"",children:"Select a category"}),B.map(s=>e.jsx("option",{value:s.value,children:s.label},s.value))]})]}),t.category==="profile"&&e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"profileUrl",className:"block text-sm font-medium text-[#0F0F0F] mb-1.5",children:["Profile URL or Username ",e.jsx("span",{className:"text-[#4B4B4B] text-xs font-normal",children:"(if known)"})]}),e.jsx("input",{id:"profileUrl",name:"profileUrl",type:"text",maxLength:500,value:t.profileUrl,onChange:r,className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl text-sm focus:outline-none focus:border-brand-400 transition-colors",placeholder:"e.g., https://plec-it.com/u/user123 or username"})]}),t.category==="listing"&&e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"listingUrl",className:"block text-sm font-medium text-[#0F0F0F] mb-1.5",children:["Listing or Service URL ",e.jsx("span",{className:"text-[#4B4B4B] text-xs font-normal",children:"(if known)"})]}),e.jsx("input",{id:"listingUrl",name:"listingUrl",type:"text",maxLength:500,value:t.listingUrl,onChange:r,className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl text-sm focus:outline-none focus:border-brand-400 transition-colors",placeholder:"e.g., https://plec-it.com/venue/abc123"})]}),t.category==="message"&&e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"conversationId",className:"block text-sm font-medium text-[#0F0F0F] mb-1.5",children:["Conversation Details ",e.jsx("span",{className:"text-[#4B4B4B] text-xs font-normal",children:"(if known)"})]}),e.jsx("input",{id:"conversationId",name:"conversationId",type:"text",maxLength:200,value:t.conversationId,onChange:r,className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl text-sm focus:outline-none focus:border-brand-400 transition-colors",placeholder:"Name of user or conversation link"})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"dateOfIncident",className:"block text-sm font-medium text-[#0F0F0F] mb-1.5",children:["Date of Incident ",e.jsx("span",{className:"text-[#4B4B4B] text-xs font-normal",children:"(optional)"})]}),e.jsx("input",{id:"dateOfIncident",name:"dateOfIncident",type:"date",value:t.dateOfIncident,onChange:r,className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl text-sm focus:outline-none focus:border-brand-400 transition-colors"})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"description",className:"block text-sm font-medium text-[#0F0F0F] mb-1.5",children:["Description ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("textarea",{id:"description",name:"description",required:!0,rows:6,maxLength:5e3,value:t.description,onChange:r,className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl text-sm focus:outline-none focus:border-brand-400 transition-colors resize-none",placeholder:"Please describe what happened in as much detail as possible..."})]}),c&&e.jsx("p",{className:"text-red-600 text-sm",role:"alert",children:c}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-4",children:[e.jsxs("button",{type:"submit",disabled:i,className:"inline-flex items-center gap-2 bg-gradient-to-r from-brand-400 to-brand-500 hover:brightness-90 text-white font-medium px-8 py-3 rounded-xl transition-all duration-300 hover:scale-105 disabled:opacity-50 disabled:hover:scale-100",children:[e.jsx(S,{className:"w-4 h-4"}),i?"Submitting...":"Submit Report"]}),e.jsx("p",{className:"text-[#4B4B4B] text-xs leading-relaxed",children:"All reports are reviewed by our team and kept confidential."})]})]})]})]})}export{Z as default};