const {Button}=window.VedutaDesignSystem_f6874f;
const TIER_OPTIONS=[
['database','01 · Curated Database'],
['concie-agent','02 · The Concie-agent'],
['scout','03 · The Scout'],
['owner','04 · The Owner'],
['unsure','Not sure yet']
];
/* Form field styled to match the design-system Input. `as` = input | textarea | select */
function VField({label,name,type='text',as='input',value,onChange,required,placeholder,options,rows=4,hint,half}){
const id='f-'+name;
const common={id,name,value,onChange:e=>onChange(e.target.value),required,placeholder,className:'vfield'};
return ;
}
function VFormStatus({status,error}){
if(status==='error')return
{error||'Something went wrong sending that. Please try again in a moment.'}
;
return null;
}
function ApplyPage({tier='',onNavigate}){
const init={firstName:'',lastName:'',email:'',phone:'',city:'',tier:TIER_OPTIONS.some(([v])=>v===tier)?tier:'unsure',travel:'',love:'',happiest:'',accredited:''};
const [f,setF]=React.useState(init);
const [status,setStatus]=React.useState('idle');
const set=k=>v=>setF(x=>({...x,[k]:v}));
React.useEffect(()=>{if(TIER_OPTIONS.some(([v])=>v===tier))setF(x=>({...x,tier}));},[tier]);
const submit=async e=>{
e.preventDefault();
if(status==='sending')return;
setStatus('sending');
const ok=await window.vedutaSubmitForm('membership-application',{...f,page:window.location.hash});
setStatus(ok?'sent':'error');
if(ok)window.scrollTo({top:0,behavior:'smooth'});
};
return
Request an Invitation
Tell us how you travel
A short introduction, read by a person. Founding members are invited from the waitlist first when we launch in Spring 2027.
{status==='sent'
?
Request received.
Thank you, {f.firstName}. We read every request ourselves and will be in touch at {f.email}.
:}
;
}
/* Contact form used on the About page. */
function VContactForm(){
const [f,setF]=React.useState({name:'',email:'',message:''});
const [status,setStatus]=React.useState('idle');
const set=k=>v=>setF(x=>({...x,[k]:v}));
const submit=async e=>{
e.preventDefault();
if(status==='sending')return;
setStatus('sending');
const ok=await window.vedutaSubmitForm('contact',{...f,page:window.location.hash});
setStatus(ok?'sent':'error');
};
if(status==='sent')return Thank you, {f.name}. We'll write back soon.
;
return ;
}
Object.assign(window,{ApplyPage,VContactForm,VField});