import{j as e}from"./vendor-query-DoyCFZ4O.js";import{r as o,L as m}from"./vendor-react-Rhy2aEWQ.js";import{u,S as j}from"./index-CwDwxmPI.js";import{m as g}from"./vendor-motion-D3eh3-LB.js";import{p as v,l as N,a3 as f,a4 as k,a0 as y}from"./vendor-utils-BOMyae96.js";function D(){const{t:a}=u("legal"),x=[{value:"access",label:a("dsarPage.rights.access.label"),desc:a("dsarPage.rights.access.desc")},{value:"rectification",label:a("dsarPage.rights.rectification.label"),desc:a("dsarPage.rights.rectification.desc")},{value:"erasure",label:a("dsarPage.rights.erasure.label"),desc:a("dsarPage.rights.erasure.desc")},{value:"restriction",label:a("dsarPage.rights.restriction.label"),desc:a("dsarPage.rights.restriction.desc")},{value:"portability",label:a("dsarPage.rights.portability.label"),desc:a("dsarPage.rights.portability.desc")},{value:"objection",label:a("dsarPage.rights.objection.label"),desc:a("dsarPage.rights.objection.desc")},{value:"withdraw",label:a("dsarPage.rights.withdraw.label"),desc:a("dsarPage.rights.withdraw.desc")},{value:"automated",label:a("dsarPage.rights.automated.label"),desc:a("dsarPage.rights.automated.desc")}],[r,i]=o.useState({name:"",email:"",right:"",details:""}),[l,h]=o.useState(!1),[d,n]=o.useState("idle"),p=async s=>{if(s.preventDefault(),!!l){n("sending");try{const c="http://localhost:8000",t=x.find(b=>b.value===r.right);await fetch(`${c}/api/v1/public/contact`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r.name,email:r.email,company:"",phone:"",service:`DSAR — ${(t==null?void 0:t.label)||r.right}`,message:`DATA SUBJECT ACCESS REQUEST
Right Exercised: ${t==null?void 0:t.label}
Details:
${r.details}`,gdpr_consent:!0,consent_timestamp:new Date().toISOString()})}),n("sent")}catch{n("error")}}};return e.jsxs("div",{className:"min-h-screen bg-white",children:[e.jsx(j,{title:a("dataRights.title"),description:a("dataRights.description"),canonical:"/data-rights"}),e.jsxs("section",{className:"relative pt-32 pb-16 lg:pt-40 lg:pb-20 overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-dark-950"}),e.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(rgba(99,102,241,0.07)_1px,transparent_1px),linear-gradient(90deg,rgba(99,102,241,0.07)_1px,transparent_1px)] bg-[size:60px_60px]"}),e.jsx("div",{className:"relative max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs(g.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 bg-white/5 border border-white/10 rounded-full mb-6",children:[e.jsx(v,{className:"w-4 h-4 text-primary-400"}),e.jsx("span",{className:"text-xs font-semibold text-primary-300 tracking-wide uppercase",children:a("dsarPage.badge")})]}),e.jsx("h1",{className:"text-3xl sm:text-4xl lg:text-5xl font-extrabold text-white leading-tight",children:a("dsarPage.heading")}),e.jsx("p",{className:"mt-4 text-dark-300 text-base sm:text-lg max-w-2xl",children:a("dsarPage.description")})]})})]}),e.jsx("section",{className:"py-16 lg:py-24",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"bg-primary-50 border border-primary-100 rounded-2xl p-6 sm:p-8 mb-10",children:[e.jsx("h2",{className:"text-lg font-bold text-dark-900 mb-3",children:a("dsarPage.infoTitle")}),e.jsxs("p",{className:"text-sm text-dark-600 leading-relaxed mb-4",children:[a("dsarPage.infoDesc")," ",e.jsx(m,{to:"/privacy#s9",className:"text-primary-600 font-medium hover:underline",children:a("dsarPage.privacySection9")}),"."]}),e.jsxs("div",{className:"grid sm:grid-cols-2 gap-3",children:[e.jsxs("div",{className:"text-sm text-dark-600",children:[e.jsx("strong",{className:"text-dark-900",children:a("dsarPage.responseTime")})," ",a("dsarPage.responseTimeValue")]}),e.jsxs("div",{className:"text-sm text-dark-600",children:[e.jsx("strong",{className:"text-dark-900",children:a("dsarPage.cost")})," ",a("dsarPage.costValue")]}),e.jsxs("div",{className:"text-sm text-dark-600",children:[e.jsx("strong",{className:"text-dark-900",children:a("dsarPage.verification")})," ",a("dsarPage.verificationValue")]}),e.jsxs("div",{className:"text-sm text-dark-600",children:[e.jsx("strong",{className:"text-dark-900",children:a("dsarPage.extension")})," ",a("dsarPage.extensionValue")]})]})]}),d==="sent"?e.jsxs(g.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center py-16",children:[e.jsx("div",{className:"w-16 h-16 bg-green-50 rounded-2xl flex items-center justify-center mx-auto mb-6",children:e.jsx(N,{className:"w-8 h-8 text-green-600"})}),e.jsx("h2",{className:"text-2xl font-bold text-dark-900 mb-3",children:a("dsarPage.submitted")}),e.jsxs("p",{className:"text-dark-500 max-w-md mx-auto mb-2",children:[a("dsarPage.submittedDesc")," ",e.jsx("strong",{children:a("dsarPage.oneMonth")}),"."]}),e.jsxs("p",{className:"text-sm text-dark-400 mb-8",children:[a("dsarPage.confirmSent")," ",e.jsx("strong",{children:r.email}),". ",a("dsarPage.checkSpam")," ",e.jsx("a",{href:"mailto:privacy@sovrandigital.co.uk",className:"text-primary-600 hover:underline",children:"privacy@sovrandigital.co.uk"}),"."]}),e.jsx(m,{to:"/",className:"inline-flex items-center gap-2 px-6 py-3 bg-dark-900 text-white text-sm font-semibold rounded-xl hover:bg-dark-800 transition-colors",children:a("dsarPage.backToHome")})]}):e.jsxs("form",{onSubmit:p,className:"space-y-8",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-dark-900 mb-4",children:a("dsarPage.yourInfo")}),e.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"dsar-name",className:"block text-sm font-medium text-dark-700 mb-1.5",children:[a("dsarPage.fullName")," ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{id:"dsar-name",type:"text",required:!0,value:r.name,onChange:s=>i({...r,name:s.target.value}),className:"w-full px-4 py-3 bg-dark-50 border border-dark-200 rounded-xl text-dark-900 text-sm focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-all",placeholder:a("dsarPage.namePlaceholder"),autoComplete:"name"})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"dsar-email",className:"block text-sm font-medium text-dark-700 mb-1.5",children:[a("dsarPage.emailAddress")," ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{id:"dsar-email",type:"email",required:!0,value:r.email,onChange:s=>i({...r,email:s.target.value}),className:"w-full px-4 py-3 bg-dark-50 border border-dark-200 rounded-xl text-dark-900 text-sm focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-all",placeholder:a("dsarPage.emailPlaceholder"),autoComplete:"email"})]})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-dark-900 mb-4",children:a("dsarPage.whichRight")}),e.jsxs("fieldset",{className:"grid gap-3",children:[e.jsx("legend",{className:"sr-only",children:a("dsarPage.selectRight")}),x.map(s=>e.jsxs("label",{className:`flex items-start gap-4 p-4 rounded-xl border cursor-pointer transition-all ${r.right===s.value?"border-primary-500 bg-primary-50/50 ring-1 ring-primary-500":"border-dark-200 hover:border-dark-300 bg-white"}`,children:[e.jsx("input",{type:"radio",name:"right",value:s.value,checked:r.right===s.value,onChange:c=>i({...r,right:c.target.value}),required:!0,className:"mt-0.5 accent-primary-600"}),e.jsxs("div",{children:[e.jsx("span",{className:"text-sm font-semibold text-dark-900",children:s.label}),e.jsx("p",{className:"text-xs text-dark-500 mt-0.5",children:s.desc})]})]},s.value))]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-dark-900 mb-4",children:a("dsarPage.additionalDetails")}),e.jsx("label",{htmlFor:"dsar-details",className:"block text-sm font-medium text-dark-700 mb-1.5",children:a("dsarPage.detailsLabel")}),e.jsx("textarea",{id:"dsar-details",required:!0,rows:5,value:r.details,onChange:s=>i({...r,details:s.target.value}),className:"w-full px-4 py-3 bg-dark-50 border border-dark-200 rounded-xl text-dark-900 text-sm focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-all resize-y",placeholder:a("dsarPage.detailsPlaceholder")})]}),e.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-4 flex gap-3",children:[e.jsx(f,{className:"w-5 h-5 text-amber-600 shrink-0 mt-0.5"}),e.jsxs("div",{className:"text-sm text-amber-800",children:[e.jsx("strong",{children:a("dsarPage.identityNotice")})," ",a("dsarPage.identityNoticeDesc")]})]}),e.jsxs("label",{className:"flex items-start gap-3 cursor-pointer group",children:[e.jsx("input",{type:"checkbox",checked:l,onChange:s=>h(s.target.checked),required:!0,className:"mt-1 accent-primary-600 w-4 h-4"}),e.jsxs("span",{className:"text-sm text-dark-600 group-hover:text-dark-800 transition-colors",children:[a("dsarPage.consent")," ",e.jsx("span",{className:"text-red-500",children:"*"})]})]}),d==="error"&&e.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-xl p-4 text-sm text-red-700",children:[a("dsarPage.errorMessage")," ",e.jsx("a",{href:"mailto:privacy@sovrandigital.co.uk",className:"font-medium hover:underline",children:"privacy@sovrandigital.co.uk"}),"."]}),e.jsxs("button",{type:"submit",disabled:d==="sending"||!l,className:"inline-flex items-center gap-2 px-8 py-3.5 bg-dark-900 text-white text-sm font-semibold rounded-xl hover:bg-dark-800 disabled:opacity-50 disabled:cursor-not-allowed transition-all",children:[e.jsx(k,{className:"w-4 h-4"}),a(d==="sending"?"dsarPage.submitting":"dsarPage.submitRequest")]})]}),e.jsxs("div",{className:"mt-16 pt-10 border-t border-dark-100",children:[e.jsx("h3",{className:"text-lg font-bold text-dark-900 mb-3",children:a("dsarPage.contactDirect")}),e.jsxs("div",{className:"bg-dark-50 p-5 rounded-xl border border-dark-100 not-prose text-sm text-dark-700 space-y-1",children:[e.jsxs("p",{children:[e.jsx("strong",{className:"text-dark-900",children:"SOVRAN DIGITAL LTD"})," — ",a("dsarPage.dataProtection")]}),e.jsxs("p",{children:["Email: ",e.jsx("a",{href:"mailto:privacy@sovrandigital.co.uk",className:"text-primary-600 hover:underline",children:"privacy@sovrandigital.co.uk"})]}),e.jsx("p",{children:"Post: 182-184 High Street North, East Ham, London, E6 2JA"})]}),e.jsxs("p",{className:"text-sm text-dark-500 mt-4",children:[a("dsarPage.notSatisfied")," ",e.jsx("a",{href:"https://ico.org.uk",target:"_blank",rel:"noopener noreferrer",className:"text-primary-600 hover:underline",children:a("dsarPage.icoLink")}),"."]})]}),e.jsx("div",{className:"mt-10 pt-8 border-t border-dark-100",children:e.jsxs(m,{to:"/",className:"inline-flex items-center gap-2 text-sm font-medium text-primary-600 hover:text-primary-700 transition-colors",children:[e.jsx(y,{className:"w-4 h-4"}),a("dsarPage.backToHome")]})})]})})]})}export{D as default};