1import{a as r,p as e}from"./chunk-6CSD65Y2-DAs4fuyP.js";import{a as l,i as B,X as P,u as L,B as g,f as _,I as p,b as H,n as J}from"./WebsiteStyleProvider-DwAyWgHp.js";import{O as C,a as U,C as R,b as V,h as W,T as S,D as T,R as G,p as X}from"./overlayFocus-Cg6WOZVn.js";import{L as c}from"./label-B4KwGtbt.js";import{T as Y}from"./textarea-NBrLqB4S.js";import{A as $}from"./arrow-right-CylFnoLp.js";const K=B("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),f=r.forwardRef(({className:a,variant:s,...t},o)=>e.jsx("div",{ref:o,role:"alert",className:l(K({variant:s}),a),...t}));f.displayName="Alert";const M=r.forwardRef(({className:a,...s},t)=>e.jsx("h5",{ref:t,className:l("mb-1 font-medium leading-none tracking-tight",a),...s}));M.displayName="AlertTitle";const y=r.forwardRef(({className:a,...s},t)=>e.jsx("div",{ref:t,className:l("text-sm [&_p]:leading-relaxed",a),...s}));y.displayName="AlertDescription";const Q=G,Z=X,ee=U,k=r.forwardRef(({className:a,...s},t)=>e.jsx(C,{ref:t,className:l("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...s}));k.displayName=C.displayName;const A=r.forwardRef(({className:a,children:s,onOpenAutoFocus:t,...o},m)=>e.jsxs(ee,{children:[e.jsx(k,{}),e.jsxs(R,{ref:m,onOpenAutoFocus:u=>{t?.(u),W(u)},className:l("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",a),...o,children:[s,e.jsxs(V,{className:"absolute right-4 top-4 roun
1ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 website-focus disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[e.jsx(P,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));A.displayName=R.displayName;const q=({className:a,...s})=>e.jsx("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left",a),...s});q.displayName="DialogHeader";const F=r.forwardRef(({className:a,...s},t)=>e.jsx(S,{ref:t,className:l("text-lg font-semibold leading-none tracking-tight",a),...s}));F.displayName=S.displayName;const O=r.forwardRef(({className:a,...s},t)=>e.jsx(T,{ref:t,className:l("text-sm text-muted-foreground",a),...s}));O.displayName=T.displayName;const ne=({trigger:a})=>{const[s,t]=r.useState(!1),[o,m]=r.useState(!1),[u,j]=r.useState(!1),[b,h]=r.useState(null),[i,v]=r.useState({name:"",email:"",company:"",phone:"",message:""}),{executeReCaptcha:I,isReady:z}=L(),d=x=>{const{name:n,value:N}=x.target;v(w=>({...w,[n]:N}))},E=async x=>{x.preventDefault(),h(null),m(!0);try{let n=null;z&&(n=await I("demo_request"));const D=await(await fetch("https://api.ustechautomations.com/api/demo-request/submit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...i,recaptchaToken:n})})).json();if(!D.success)throw new Error(D.error||"Failed to submit demo request");j(!0),J("demo_request"),setTimeout(()=>{j(!1),h(null),v({name:"",email:"",company:"",phone:"",message:""}),t(!1)},3e3)}catch(n){h(n instanceof Error?n.message:"Something went wrong")}finally{m(!1)}};return e.jsxs(Q,{open:s,onOpenChange:t,children:[e.jsx(Z,{asChild:!0,children:a||e.jsxs(g,{size:"lg",children:["Schedule Demo",e.jsx($,{className:"ml-2 h-5 w-5"})]})}),e.jsxs(A,{className:"sm:max-w-[500px]",children:[e.jsxs(q,{children:[e.jsx(F,{className:"text-2xl",children:"Request a Demo"}),e.jsx(O,{children:"Fill out the form below and our team will reach out to schedule a personalized demo of our automation platform."})]}),u?e.jsxs(f,{className:"bg-primary/10 border-primary/20",children:[e.jsx(_,{className:"h-4 w-4 text-primary"}),e.jsx(y,{className:"text-foreground",children:"Thank you! Your demo request has been received. We'll contact you within 24 hours."})]}):e.jsxs("form",{onSubmit:E,className:"space-y-4 mt-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"name",children:"Name *"}),e.jsx(p,{id:"name",name:"name",value:i.name,onChange:d,required:!0,placeholder:"John Doe",disabled:o})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"company",children:"Company *"}),e.jsx(p,{id:"company",name:"company",value:i.company,onChange:d,required:!0,placeholder:"Acme Inc.",disabled:o})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"email",children:"Email *"}),e.jsx(p,{id:"email",name:"email",type:"email",value:i.email,onChange:d,required:!0,placeholder:"[email protected]",disabled:o})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"phone",children:"Phone"}),e.jsx(p,{id:"phone",name:"phone",type:"tel",value:i.phone,onChange:d,placeholder:"+1 (555) 123-4567",disabled:o})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"message",children:"Tell us about your automation needs"}),e.jsx(Y,{id:"message",name:"message",value:i.message,onChange:d,placeholder:"What processes are you looking to automate?",className:"min-h-[100px]",disabled:o})]}),b&&e.jsxs(f,{variant:"destructive",children:[e.jsx(H,{className:"h-4 w-4"}),e.jsx(y,{children:b})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[e.jsx(g,{type:"button",variant:"outline",onClick:()=>t(!1),disabled:o,children:"Cancel"}),e.jsx(g,{type:"submit",disabled:o,children:o?"Submitting...":"Request Demo"})]})]})]})]})};export{ne as D};
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.