import{Y as e,g as t,q as n,t as r}from"./content-CDx7LzDD.js";import{n as i,r as a}from"./index-CnzEagFS.js";var o=e(n()),s=t(),c=[`Defence policy`,`Defence industry`,`Defence research`,`Media & speaking`,`Other`];function l(){let[e,t]=(0,o.useState)(!1),[n,l]=(0,o.useState)(``),[d,f]=(0,o.useState)(`mailto:${r.email}`);function p(e){e.preventDefault(),l(``);let n=new FormData(e.currentTarget),i=String(n.get(`name`)??``).trim(),a=String(n.get(`organisation`)??``).trim(),o=String(n.get(`email`)??``).trim(),s=String(n.get(`subject`)??``).trim(),c=String(n.get(`message`)??``).trim();if(!i||!a||!o||!s||!c){l(`Please complete every field.`);return}if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o)){l(`Please enter a valid email address.`);return}let u=[`Name: ${i}`,`Organisation: ${a}`,`Email: ${o}`,`Subject: ${s}`,``,c].join(`
`),d=`mailto:${r.email}?subject=${encodeURIComponent(`Enquiry — ${s}`)}&body=${encodeURIComponent(u)}`;f(d),t(!0)}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i,{kicker:`Contact`,title:`Write to a principal.`,lede:`Enquiries are reviewed in Singapore. We reply to serious correspondence. Please do not send classified or restricted material.`}),(0,s.jsx)(`section`,{className:`bg-paper text-ink-fg`,children:(0,s.jsxs)(`div`,{className:`site-wrap grid gap-14 py-16 md:grid-cols-12 md:py-24`,children:[(0,s.jsxs)(`div`,{className:`md:col-span-5`,children:[(0,s.jsx)(`img`,{src:`/images/colonnade.jpg`,alt:`Evening colonnade in Singapore’s financial district.`,className:`aspect-4/5 w-full object-cover`}),(0,s.jsxs)(`div`,{className:`mt-8 space-y-6`,children:[(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`p`,{className:`label-kicker !text-ink-muted`,children:`Email`}),(0,s.jsx)(`a`,{href:`mailto:${r.email}`,className:`mt-2 block font-display text-2xl text-ink-fg no-underline`,children:r.email})]}),(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`p`,{className:`label-kicker !text-ink-muted`,children:`Telephone`}),(0,s.jsx)(`p`,{className:`mt-2 font-display text-2xl`,children:r.phone})]}),(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`p`,{className:`label-kicker !text-ink-muted`,children:`Office`}),(0,s.jsx)(`address`,{className:`mt-2 not-italic font-display text-2xl leading-snug`,children:r.addressLines.map(e=>(0,s.jsx)(`span`,{className:`block`,children:e},e))}),(0,s.jsx)(`p`,{className:`mt-3 text-sm text-ink-muted`,children:r.hours})]})]})]}),(0,s.jsx)(`div`,{className:`md:col-span-7`,children:e?(0,s.jsxs)(`div`,{className:`border border-rule bg-ivory p-8 md:p-10`,children:[(0,s.jsx)(`p`,{className:`label-kicker !text-ink-muted`,children:`Received`}),(0,s.jsx)(`h2`,{className:`mt-4 font-display text-3xl font-medium`,children:`Your message is ready to send.`}),(0,s.jsxs)(`p`,{className:`mt-4 leading-relaxed text-ink-muted`,children:[`Write to`,` `,(0,s.jsx)(`a`,{href:d,className:`text-ink-fg underline underline-offset-4`,children:r.email}),`. A principal will reply on unclassified terms. Do not attach or describe classified or restricted material.`]}),(0,s.jsx)(`a`,{href:d,className:`mt-8 inline-flex min-h-12 items-center bg-ink px-6 text-[0.78rem] font-semibold tracking-[0.16em] text-fg uppercase no-underline transition-[background-color,scale] duration-150 ease-out hover:bg-ink-soft active:scale-[0.96]`,children:`Open email draft`})]}):(0,s.jsxs)(`form`,{onSubmit:p,className:`space-y-6`,noValidate:!0,children:[(0,s.jsx)(u,{label:`Name`,name:`name`,autoComplete:`name`}),(0,s.jsx)(u,{label:`Organisation`,name:`organisation`,autoComplete:`organization`}),(0,s.jsx)(u,{label:`Email`,name:`email`,type:`email`,autoComplete:`email`}),(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`label`,{htmlFor:`subject`,className:`label-kicker !text-ink-muted`,children:`Subject`}),(0,s.jsxs)(`select`,{id:`subject`,name:`subject`,defaultValue:``,className:`mt-2 min-h-12 w-full border border-rule bg-ivory px-3 text-[1.02rem] text-ink-fg outline-none transition-[border-color] duration-150 focus:border-ink`,children:[(0,s.jsx)(`option`,{value:``,disabled:!0,children:`Select a practice`}),c.map(e=>(0,s.jsx)(`option`,{value:e,children:e},e))]})]}),(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`label`,{htmlFor:`message`,className:`label-kicker !text-ink-muted`,children:`Message`}),(0,s.jsx)(`textarea`,{id:`message`,name:`message`,rows:7,className:`mt-2 w-full border border-rule bg-ivory px-3 py-3 text-[1.02rem] text-ink-fg outline-none transition-[border-color] duration-150 focus:border-ink`})]}),n?(0,s.jsx)(`p`,{className:`text-sm text-ink-fg`,role:`alert`,children:n}):null,(0,s.jsx)(`p`,{className:`text-sm leading-relaxed text-ink-muted`,children:`By sending an enquiry you confirm that the contents are unclassified. Daciora does not accept restricted or classified material by email.`}),(0,s.jsx)(`button`,{type:`submit`,className:a(`inline-flex min-h-12 items-center bg-ink px-8`,`text-[0.78rem] font-semibold tracking-[0.16em] text-fg uppercase`,`transition-[background-color,scale] duration-150 ease-out`,`hover:bg-ink-soft active:scale-[0.96]`),children:`Send enquiry`})]})})]})})]})}function u({label:e,name:t,type:n=`text`,autoComplete:r}){return(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`label`,{htmlFor:t,className:`label-kicker !text-ink-muted`,children:e}),(0,s.jsx)(`input`,{id:t,name:t,type:n,autoComplete:r,className:`mt-2 min-h-12 w-full border border-rule bg-ivory px-3 text-[1.02rem] text-ink-fg outline-none transition-[border-color] duration-150 focus:border-ink`})]})}export{l as component};