1import{r as u,ao as e,bc as m,cT as b,fK as f,fI as w,e_ as v,cs as k,d9 as C,bh as L,bo as S,bi as F,br as A}from"./vendor-Cx3XjiwH.js";import{y as E,n as P,S as O,B as x,L as i,I as l,a1 as _,F as T}from"./index-DWgQSHWI.js";import{L as q}from"./LocationAutocomplete-DSENyAjc.js";import"./vendor-date-CvtT4FNq.js";import"./vendor-phone-BTA4zMnp.js";import"./locationStorage-DNjjpAsz.js";const B={firstName:"",lastName:"",workEmail:"",phoneNumber:"",company:"",websiteOrLinkedin:"",location:"",additionalNotes:""};function R(){const[p,o]=u.useState(!1);return{submit:async a=>{o(!0);try{const{data:h,error:d}=await E.from("partner_request").insert([{first_name:a.firstName,last_name:a.lastName,work_email:a.workEmail,phone_number:a.phoneNumber,company:a.company,website_or_linkedin:a.websiteOrLinkedin||null,location:a.location,prior_experience:"Client Activated",additional_notes:a.additionalNotes||null}]).select("slug").single();if(d)throw d;try{await fetch("https://spacebly.com/api/main/partner-reg",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:window.location.origin,slug:h?.slug,...a,priorExperience:"Client Activated"})})}catch{}}finally{o(!1)}},loading:p}}const y="https://spacebly.com/partner/apply",U=[{icon:b,title:"Direct tenants",text:"Briefs from founders, HR and ops teams searching right now."},{icon:f,title:"Pay your way",text:"A success fee only when a tenant signs, or a flat subscription."},{icon:w,title:"Live dashboard",text:"Views, shortlists and tour requests in one place."}],W=[{icon:v,title:"Apply",text:"Two minutes. Tell us who you are."},{icon:k,title:"We verify",text:"Our team checks your details and gets in touch."},{icon:C,title:"Go live",text:"Most operators are live within 48 hours."}],J=()=>{const{toast:p}=P(),{submit:o,loading:c}=R(),[a,h]=u.useState(B),[d,g]=u.useState(!1),t=(s,r)=>h(n=>({...n,[s]:r})),N=async s=>{s.preventDefault();try{await o(a),g(!0),window.scrollTo({top:0,behavior:"smooth"})}catch{p({title:"Error",description:"Failed to submit application. Please try again.",variant:"destructive"})}};return e.jsxs(e.Fragment,{children:[e.jsx(O,{title:"Apply to list your spaces",description:"Apply to become a Spacebly partner. List your office spaces and reach UK tenants direct â success fee only when a tenant signs, or a flat subscription.",url:y,breadcrumbList:[{name:"Home",url:"https://spacebly.com"},{name:"Partner",url:"https://spacebly.com/partner"},{name:"Apply",url:y}]}),e.jsxs("main",{className:"relative overflow-hidden bg-background",children:[e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute -top-40 -right-40 h-[520px] w-[520px] rounded-full bg-primary/15 blur-3xl"}),e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute top-1/2 -left-48 h-[420px] w-[420px] rounded-full bg-primary/10 blur-3xl"}),e.jsxs("div",{className:"container relative mx-auto px-4 py-12 md:py-20",children:[e.jsxs("nav",{"aria-label":"Breadcrumb",className:"mb-8 text-sm text-muted-foreground",children:[e.jsx(m,{to:"/",className:"hover:text-primary",children:"Home"})," ",e.jsx("span",{className:"mx-1",children:"/"}),e.jsx(m,{to:"/partner",className:"hover:text-primary",children:"Partner"})," ",e.jsx("span",{className:"mx-1",children:"/"}),e.jsx("span",{className:"text-foreground",children:"Apply"})]}),e.jsxs("div",{className:"grid gap-12 lg:grid-cols-[1fr_1.1fr] lg:gap-16 items-start",children:[e.jsxs("section",{className:"lg:sticky lg:top-28",children:[e.jsx("span",{className:"inline-flex items-center gap-2 rounded-full border border-primary/30 bg-primary/10 px-3 py-1 text-xs font-semibold uppercase tracking-wider text-primary",children:"Partner application"}),e.jsxs("h1",{className:"mt-5 text-4xl md:text-5xl lg:text-6xl font-bold tracking-tight text-foreground leading-[1.05]",children:["List your spaces on ",e.jsx("span",{className:"text-primary",children:"Spacebly"})]}),e.jsx("p",{className:"mt-5 max-w-xl text-lg text-muted-foreground",children:"Reach UK office tenants direct. No exclusives, no upfront cost â tell us about your business and we'll take it from there."}),e.jsx("ul",{className:"mt-10 space-y-5",children:U.map(({icon:s,title:r,text:n})=>e.jsxs("li",{className:"flex gap-4",children:[e.jsx("span",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-primary text-primary-foreground shadow-lg shadow-primary/25",children:e.jsx(s,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold text-foreground",children:r}),e.jsx("p",{className:"text-sm text-muted-foreground",children:n})]})]},r))}),e.jsxs("div",{className:"mt-12",children:[e.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wider text-muted-foreground",children:"What happens next"}),e.jsx("ol",{className:"mt-5 grid gap-4 sm:grid-cols-3",children:W.map(({icon:s,title:r,text:n},j)=>e.jsxs("li",{className:"rounded-2xl border bg-card/70 p-4 backdrop-blur",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(s,{className:"h-4 w-4"}),e.jsxs("span",{className:"text-xs font-bold",children:["STEP ",j+1]})]}),e.jsx("p",{className:"mt-2 font-semibold text-foreground",children:r}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:n})]},r))})]}),e.jsxs("p",{className:"mt-8 flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(L,{className:"h-4 w-4 text-primary"}),"Your details are only used to review your application."]})]}),e.jsx("section",{className:"rounded-3xl border bg-card p-6 md:p-10 shadow-2xl shadow-primary/10",children:d?e.jsxs("div",{className:"py-10 text-center",children:[e.jsx("span",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-primary/10 text-primary",children:e.jsx(S,{className:"h-9 w-9"})}),e.jsx("h2",{className:"mt-6 text-3xl font-bold text-foreground",children:"Application received"}),e.jsxs("p",{className:"mx-auto mt-3 max-w-md text-muted-foreground",children:["Thanks, ",a.firstName||"partner",". Our team will review your details and be in touch shortly."]}),e.jsxs("div",{className:"mt-8 flex flex-col sm:flex-row justify-center gap-3",children:[e.jsx(x,{asChild:!0,size:"lg",children:e.jsx(m,{to:"/partner",children:"Back to Partner page"})}),e.jsx(x,{asChild:!0,size:"lg",variant:"outline",children:e.jsx(m,{to:"/",children:"Go to homepage"})})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"text-2xl font-bold text-foreground",children:"Your details"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Fields marked * are required."}),e.jsxs("form",{onSubmit:N,className:"mt-8 space-y-5",children:[e.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"firstName",children:"First name *"}),e.jsx(l,{id:"firstName",required:!0,value:a.firstName,onChange:s=>t("firstName",s.target.value),placeholder:"John",className:"h-12"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"lastName",children:"Last name *"}),e.jsx(l,{id:"lastName",required:!0,value:a.lastName,onChange:s=>t("lastName",s.target.value),placeholder:"Smith",className:"h-12"})]})]}),e.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"workEmail",children:"Work email *"}),e.jsx(l,{id:"workEmail",type:"email",required:!0,value:a.workEmail,onChange:s=>t("workEmail",s.target.value),placeholder:"[email protected]",className:"h-12"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"phoneNumber",children:"Phone number *"}
1),e.jsx(l,{id:"phoneNumber",type:"tel",required:!0,value:a.phoneNumber,onChange:s=>t("phoneNumber",s.target.value),placeholder:"+44 20 1234 5678",className:"h-12"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"company",children:"Company *"}),e.jsx(l,{id:"company",required:!0,value:a.company,onChange:s=>t("company",s.target.value),placeholder:"Your company name",className:"h-12"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"websiteOrLinkedin",children:"Website or LinkedIn"}),e.jsx(l,{id:"websiteOrLinkedin",type:"url",value:a.websiteOrLinkedin,onChange:s=>t("websiteOrLinkedin",s.target.value),placeholder:"https://yourcompany.com",className:"h-12"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"location",children:"Where are you based? *"}),e.jsx(q,{id:"location",value:a.location,onChange:s=>t("location",s),onLocationSelect:s=>t("location",s),placeholder:"Search for your location...",required:!0})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"additionalNotes",children:"Anything else?"}),e.jsx(_,{id:"additionalNotes",rows:4,value:a.additionalNotes,onChange:s=>t("additionalNotes",s.target.value),placeholder:"Number of buildings, cities, anything we should knowâ¦"})]}),e.jsxs(x,{type:"submit",size:"lg",disabled:c,className:"h-14 w-full text-base font-semibold",children:[c?e.jsx(F,{className:"mr-2 h-5 w-5 animate-spin"}):null,"Submit application",!c&&e.jsx(A,{className:"ml-2 h-5 w-5"})]})]})]})})]})]})]}),e.jsx(T,{})]})};export{J as default};
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.