1import{r as c,x as b,v as k,m as e,L as p,B as r,J as j,K as S,T as A}from"./index-CpSGH3si.js";import{I as i}from"./input-CJQwYE0h.js";import{T as L}from"./textarea-DnsCXU4p.js";import{m as u}from"./proxy-DFy_m_5J.js";import{C as h}from"./circle-check-big-BfTSBK82.js";import{A as P}from"./index-CtsrXVb9.js";import{K as R}from"./key-square-DetLsqmI.js";import{F as M}from"./file-check-S7sm86QY.js";import{C as T}from"./clipboard-list-BzpklLQv.js";import{A as g}from"./arrow-right-wWO7VtP3.js";import{A as f}from"./arrow-left-BWOwnNcQ.js";const F=[{value:"realtor",label:"Realtor",icon:R,color:"border-blue-200 bg-blue-50",activeColor:"border-blue-500 bg-blue-50 ring-2 ring-blue-400",iconColor:"text-blue-600",desc:"Coordinate repairs & closings"},{value:"mortgage_officer",label:"Mortgage Representative",icon:S,color:"border-purple-200 bg-purple-50",activeColor:"border-purple-500 bg-purple-50 ring-2 ring-purple-400",iconColor:"text-purple-600",desc:"Track renovation financing"},{value:"closing_agent",label:"Title / Closing Agent",icon:M,color:"border-rose-200 bg-rose-50",activeColor:"border-rose-500 bg-rose-50 ring-2 ring-rose-400",iconColor:"text-rose-600",desc:"Manage pre-closing tasks"},{value:"home_inspector",label:"Home Inspector",icon:T,color:"border-orange-200 bg-orange-50",activeColor:"border-orange-500 bg-orange-50 ring-2 ring-orange-400",iconColor:"text-orange-600",desc:"Flag repairs & track completion"},{value:"property_manager",label:"Property Manager",icon:j,color:"border-teal-200 bg-teal-50",activeColor:"border-teal-500 bg-teal-50 ring-2 ring-teal-400",iconColor:"text-teal-600",desc:"Manage portfolios & maintenance"},{value:"property_investor",label:"Investor",icon:A,color:"border-indigo-200 bg-indigo-50",activeColor:"border-indigo-500 bg-indigo-50 ring-2 ring-indigo-400",iconColor:"text-indigo-600",desc:"Coordinate rehab projects"}],E=["Grand Rapids","Ada","Kentwood","Wyoming","Grandville","Caledonia","Forest Hills","Byron Center","Holland","Zeeland","Muskegon","Kalamazoo","Lansing"],B=["FHA Loans","Conventional Loans","Renovation Loans (203k)","Investor Loans","Refinance Programs","Fix & Flip Financing","USDA Loans","VA Loans","Jumbo Loans"];function V(){const[o,d]=c.useState(1),[v,N]=c.useState(null),[a,m]=c.useState({professional_type:"",full_name:"",company_name:"",phone:"",license_number:"",license_type:"",bio:"",service_areas:[],specializations:[],years_experience:""}),[y,_]=c.useState(!1);c.useEffect(()=>{b.auth.me().then(s=>{N(s),m(l=>({...l,full_name:s.full_name||""}))}).catch(()=>b.auth.redirectToLogin())},[]);const x=k({mutationFn:s=>b.entities.Professional.create({...s,user_email:v.email,years_experience:s.years_experience?parseFloat(s.years_experience):void 0,verification_status:"pending",is_verified:!1}),onSuccess:()=>_(!0)}),t=(s,l)=>m(n=>({...n,[s]:l})),C=s=>m(l=>({...l,service_areas:l.service_areas.includes(s)?l.service_areas.filter(n=>n!==s):[...l.service_areas,s]})),w=s=>m(l=>({...l,specializations:l.specializations.includes(s)?l.specializations.filter(n=>n!==s):[...l.specializations,s]}));return y?e.jsx("div",{className:"min-h-screen bg-gradient-to-br from-green-50 to-white flex items-center justify-center px-4",children:e.jsxs(u.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"text-center max-w-md",children:[e.jsx("div",{className:"w-20 h-20 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-6",children:e.jsx(h,{className:"w-10 h-10 text-green-600"})}),e.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-3",children:"Welcome to BuildSlot!"}),e.jsx("p",{className:"text-slate-600 mb-8",children:"Your professional profile has been created. You can now access the Property Hub and collaborate with other professionals."}),e.jsxs("div",{className:"flex flex-col gap-3",children:[a.professional_type==="mortgage_officer"?e.jsx(p,{to:"/MortgageDashboard",children:e.jsx(r,{className:"bg-purple-600 hover:bg-purple-700 w-full",children:"Open Mortgage Dashboard"})}):e.jsx(p,{to:"/PropertyHub",children:e.jsx(r,{className:"bg-blue-600 hover:bg-blue-700 w-full",children:"Go to Property Hub"})}),e.jsx(p,{to:"/ProfessionalDashboard",children:e.jsx(r,{variant:"outline",className:"w-full",children:"View My Dashboard"})})]})]})}):e.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 to-white",children:e.jsxs("div",{className:"max-w-2xl mx-auto px-4 py-12",children:[e.jsxs("div",{className:"text-center mb-10",children:[e.jsx("div",{className:"w-12 h-12 bg-blue-600 rounded-2xl flex items-center justify-center mx-auto mb-4",children:e.jsx(j,{className:"w-6 h-6 text-white"})}),e.jsx("h1",{className:"text-3xl font-bold text-slate-900",children:"Join as a Professional"}),e.jsx("p",{className:"text-slate-500 mt-2",children:"Set up your profile and start collaborating on property projects"})]}),e.jsx("div",{className:"flex items-center justify-center gap-2 mb-10",children:[1,2,3].map(s=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-sm font-semibold transition-all ${o>=s?"bg-blue-600 text-white":"bg-slate-200 text-slate-500"}`,children:s}),s<3&&e.jsx("div",{className:`w-12 h-0.5 ${o>s?"bg-blue-600":"bg-slate-200"}`})]},s))}),e.jsx(P,{mode:"wait",children:e.jsxs(u.div,{initial:{opacity:0,x:20}
1,animate:{opacity:1,x:0},exit:{opacity:0,x:-20},children:[o===1&&e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 p-6 shadow-sm",children:[e.jsx("h2",{className:"text-xl font-bold text-slate-900 mb-2",children:"What is your role?"}),e.jsx("p",{className:"text-slate-500 text-sm mb-6",children:"Select the option that best describes your work in property transactions."}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-6",children:F.map(s=>e.jsxs("button",{onClick:()=>t("professional_type",s.value),className:`flex items-center gap-3 p-4 rounded-xl border-2 text-left transition-all ${a.professional_type===s.value?s.activeColor:s.color}`,children:[e.jsx("div",{className:`w-10 h-10 rounded-lg bg-white flex items-center justify-center shrink-0 ${s.iconColor}`,children:e.jsx(s.icon,{className:"w-5 h-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold text-slate-900 text-sm",children:s.label}),e.jsx("p",{className:"text-xs text-slate-500",children:s.desc})]}),a.professional_type===s.value&&e.jsx(h,{className:"w-4 h-4 text-current ml-auto shrink-0"})]},s.value))}),e.jsxs(r,{onClick:()=>d(2),disabled:!a.professional_type,className:"w-full bg-blue-600 hover:bg-blue-700 gap-2",children:["Continue ",e.jsx(g,{className:"w-4 h-4"})]})]}),o===2&&e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 p-6 shadow-sm",children:[e.jsx("h2",{className:"text-xl font-bold text-slate-900 mb-2",children:"Your Information"}),e.jsx("p",{className:"text-slate-500 text-sm mb-6",children:"Tell us about yourself so clients and collaborators can find you."}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-1",children:"Full Name *"}),e.jsx(i,{value:a.full_name,onChange:s=>t("full_name",s.target.value),placeholder:"Jane Smith"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-1",children:"Company / Firm Name"}),e.jsx(i,{value:a.company_name,onChange:s=>t("company_name",s.target.value),placeholder:"Smith Realty Group"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-1",children:"Phone"}),e.jsx(i,{value:a.phone,onChange:s=>t("phone",s.target.value),placeholder:"(616) 555-0000"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-1",children:"Years Experience"}),e.jsx(i,{type:"number",value:a.years_experience,onChange:s=>t("years_experience",s.target.value),placeholder:"8"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-1",children:"License Number"}),e.jsx(i,{value:a.license_number,onChange:s=>t("license_number",s.target.value),placeholder:"MI-RE-123456"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-1",children:"License Type"}),e.jsx(i,{value:a.license_type,onChange:s=>t("license_type",s.target.value),placeholder:"Residential Realtor"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-1",children:"Bio / About"}),e.jsx(L,{value:a.bio,onChange:s=>t("bio",s.target.value),rows:3,placeholder:"Tell clients and collaborators about your experience and expertise..."})]})]}),e.jsxs("div",{className:"flex gap-3 mt-6",children:[e.jsxs(r,{variant:"outline",onClick:()=>d(1),className:"gap-2",children:[e.jsx(f,{className:"w-4 h-4"})," Back"]}),e.jsxs(r,{onClick:()=>d(3),disabled:!a.full_name,className:"flex-1 bg-blue-600 hover:bg-blue-700 gap-2",children:["Continue ",e.jsx(g,{className:"w-4 h-4"})]})]})]}),o===3&&e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 p-6 shadow-sm",children:[e.jsx("h2",{className:"text-xl font-bold text-slate-900 mb-2",children:"Service Areas"}),e.jsx("p",{className:"text-slate-500 text-sm mb-6",children:"Select the areas you serve. This helps match you with property projects nearby."}),e.jsx("div",{className:"flex flex-wrap gap-2 mb-6",children:E.map(s=>e.jsx("button",{onClick:()=>C(s),className:`px-3 py-1.5 rounded-full text-sm border transition-all ${a.service_areas.includes(s)?"bg-blue-600 text-white border-blue-600":"bg-white text-slate-600 border-slate-200 hover:border-blue-300"}`,children:s},s))}),a.service_areas.length>0&&e.jsxs("p",{className:"text-sm text-blue-600 mb-4",children:[a.service_areas.length," area",a.service_areas.length>
11?"s":""," selected"]}),a.professional_type==="mortgage_officer"&&e.jsxs("div",{className:"border-t pt-5 mt-2 mb-4",children:[e.jsx("h3",{className:"text-base font-bold text-slate-900 mb-1",children:"Specialty Loan Programs"}),e.jsx("p",{className:"text-slate-500 text-sm mb-4",children:"Select the loan programs you offer. This helps contractors and clients understand your expertise."}),e.jsx("div",{className:"flex flex-wrap gap-2",children:B.map(s=>e.jsx("button",{onClick:()=>w(s),className:`px-3 py-1.5 rounded-full text-sm border transition-all ${a.specializations.includes(s)?"bg-purple-600 text-white border-purple-600":"bg-white text-slate-600 border-slate-200 hover:border-purple-300"}`,children:s},s))})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs(r,{variant:"outline",onClick:()=>d(2),className:"gap-2",children:[e.jsx(f,{className:"w-4 h-4"})," Back"]}),e.jsx(r,{onClick:()=>x.mutate(a),disabled:x.isPending,className:"flex-1 bg-blue-600 hover:bg-blue-700",children:x.isPending?"Creating Profile...":"Create My Profile"})]})]})]},o)})]})})}export{V 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.