import{f as _,r as s,j as e,L as y}from"./vendor-react-DgEFbQIi.js";import{v as T}from"./supportSubmissions-Dnt2EG69.js";import{Z as q,k as A,T as $}from"./index-DFVuS8SP.js";import"./vendor-maps-bOuA10hf.js";import"./vendor-amplify-BBi2B1tW.js";import{u as D}from"./useSeo-eyKuqwK1.js";import{C as O}from"./support-BT2WeAbE.js";import{C as R}from"./circle-check-DeY5-glE.js";import"./vendor-radix-kdo0k_bv.js";import"./vendor-motion-CzLrDd6y.js";const c=[{id:"outreach",label:"Outreach engine"},{id:"crm",label:"PLEC CRM"},{id:"both",label:"Both"},{id:"other",label:"Something else"}],I=r=>c.some(o=>o.id===r),a="w-full rounded-xl border-2 border-gray-200 bg-white px-4 py-3 text-base focus:border-brand-400 focus:outline-none";function K(){var F;D({title:"Book a demo | PLEC",description:"See PLEC's tools for event businesses: the outreach engine that finds new clients and the CRM that runs your bookings."});const[r]=_(),o=r.get("product"),[l,N]=s.useState(I(o)?o:"outreach"),[u,v]=s.useState(""),[x,k]=s.useState(""),[i,C]=s.useState(""),[h,S]=s.useState(""),[p,B]=s.useState(""),[b,f]=s.useState(!1),[g,n]=s.useState(null),[m,E]=s.useState(null),j=((F=c.find(t=>t.id===l))==null?void 0:F.label)??"Something else",P=async t=>{if(t.preventDefault(),n(null),!i.trim()){n("Company is required.");return}const d=T({name:u,email:x,phone:h,subject:`Demo request: ${j}`,message:[`Company: ${i.trim()}`,`Interested in: ${j}`,p.trim()].filter(Boolean).join(`
`)});if(d.ok===!1){n(d.error);return}f(!0);try{const w=await fetch($("/support/contact"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(d.value)});if(!w.ok)throw new Error("Failed to submit");const L=await w.json();E(L.ticketId??"")}catch{n(`Something went wrong. Please try again or email us at ${O}.`)}finally{f(!1)}};return e.jsx(q,{showSearch:!1,showFooter:!0,children:e.jsx("div",{className:"bg-[#FFF4F2]",children:e.jsxs("div",{className:"container mx-auto px-4 py-10 md:py-16",children:[e.jsxs(y,{to:"/","data-track":"demo_back_home",className:"-ml-1 inline-flex min-h-[44px] items-center gap-1.5 rounded-full px-1 text-sm font-medium text-[#4B4B4B] hover:text-[#0F0F0F]",children:[e.jsx(A,{className:"h-4 w-4","aria-hidden":"true"}),"Back to home"]}),e.jsxs("div",{className:"mx-auto mt-4 max-w-2xl text-center",children:[e.jsx("span",{className:"inline-flex rounded-full bg-white px-3 py-1 text-sm font-medium text-[#A82E20] shadow-sm",children:"For venues and vendors"}),e.jsx("h1",{className:"mt-5 text-4xl leading-tight text-[#0F0F0F] md:text-5xl",children:"Book a demo"}),e.jsx("p",{className:"mx-auto mt-4 max-w-xl text-lg leading-relaxed text-[#4B4B4B]",children:"See how our outreach engine finds new clients and how PLEC CRM runs your bookings, invoices and contracts. Tell us a little about your business and we'll set up a time."})]}),e.jsx("div",{className:"mx-auto mt-10 max-w-2xl",children:m!==null?e.jsxs("div",{role:"status",className:"rounded-3xl border border-brand-100 bg-white p-8 text-center md:p-12",children:[e.jsx(R,{className:"mx-auto h-10 w-10 text-brand-500","aria-hidden":"true"}),e.jsx("h2",{className:"mt-4 text-2xl text-[#0F0F0F]",children:"Thanks, we'll be in touch"}),e.jsxs("p",{className:"mx-auto mt-2 max-w-md text-[#4B4B4B]",children:["A member of our team will reach out to set up your demo.",m?` Your reference is ${m}.`:""]}),e.jsx(y,{to:"/","data-track":"demo_done_home",className:"mt-6 inline-flex min-h-[44px] items-center rounded-full border border-gray-300 px-6 font-medium text-[#0F0F0F] hover:border-gray-400",children:"Back to home"})]}):e.jsxs("form",{onSubmit:P,noValidate:!0,className:"space-y-6 rounded-3xl border border-gray-200 bg-white p-6 shadow-sm md:p-10",children:[e.jsxs("fieldset",{children:[e.jsx("legend",{className:"text-sm font-medium text-[#0F0F0F]",children:"What would you like to see?"}),e.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:c.map(t=>e.jsxs("label",{className:"inline-flex min-h-[44px] cursor-pointer items-center rounded-full border-2 px-4 text-sm font-medium transition-colors focus-within:ring-2 focus-within:ring-[#141414] "+(l===t.id?"border-[#141414] bg-[#141414] text-white":"border-gray-200 text-[#0F0F0F] hover:border-gray-300"),children:[e.jsx("input",{type:"radio",name:"product",value:t.id,checked:l===t.id,onChange:()=>N(t.id),"data-track":`demo_product_${t.id}`,className:"sr-only"}),t.label]},t.id))})]}),e.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"demo-name",className:"mb-1.5 block text-sm font-medium text-[#0F0F0F]",children:["Your name ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx("input",{id:"demo-name",required:!0,autoComplete:"name",value:u,onChange:t=>v(t.target.value),className:a})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"demo-email",className:"mb-1.5 block text-sm font-medium text-[#0F0F0F]",children:["Work email ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx("input",{id:"demo-email",type:"email",required:!0,autoComplete:"email",value:x,onChange:t=>k(t.target.value),className:a})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"demo-company",className:"mb-1.5 block text-sm font-medium text-[#0F0F0F]",children:["Company ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx("input",{id:"demo-company",required:!0,autoComplete:"organization",value:i,onChange:t=>C(t.target.value),className:a})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"demo-phone",className:"mb-1.5 block text-sm font-medium text-[#0F0F0F]",children:["Phone ",e.jsx("span",{className:"font-normal text-[#6B6B6B]",children:"(optional)"})]}),e.jsx("input",{id:"demo-phone",type:"tel",autoComplete:"tel",value:h,onChange:t=>S(t.target.value),className:a})]})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"demo-notes",className:"mb-1.5 block text-sm font-medium text-[#0F0F0F]",children:["Anything we should know?"," ",e.jsx("span",{className:"font-normal text-[#6B6B6B]",children:"(optional)"})]}),e.jsx("textarea",{id:"demo-notes",rows:4,value:p,onChange:t=>B(t.target.value),placeholder:"e.g. We run two venues in Austin and want more corporate bookings.",className:`${a} resize-none`})]}),g&&e.jsx("p",{role:"alert",className:"rounded-xl bg-red-50 px-4 py-3 text-sm text-red-700",children:g}),e.jsx("button",{type:"submit",disabled:b,"data-track":"demo_request_submit",className:"inline-flex min-h-[48px] w-full items-center justify-center rounded-full bg-[#141414] px-7 text-base font-semibold text-white transition-colors hover:bg-black disabled:opacity-60 md:w-auto",children:b?"Sending...":"Request my demo"})]})})]})})})}export{c as DEMO_PRODUCTS,K as default};