1import{aq as E,r as i,W as P,j as e,B as g,aD as U,a4 as j,a8 as B,i as k,U as S,A as $,c as I,F as O,q as Y,Q as q,$ as F,a0 as M,a1 as R,a2 as V,a3 as z,a5 as G,L as K,u as Q,C as _,a as H,O as W,M as Z,E as J,d as X}from"./index-tc5-nNLC.js";import{L as p}from"./label-MwGx_WS4.js";import{T as ee}from"./textarea-DN2rY_yY.js";import{S as D,a as T,b as A,c as L,d}from"./select-Bsa-6vNv.js";import{C as se}from"./circle-check-big-CUgqPmz6.js";import{G as te}from"./globe-CrY5Q3gB.js";import"./index-C-y5wYFI.js";import"./chevron-down-DOFZ7rzv.js";import"./chevron-up-1gTexUQn.js";/** 2 * @license lucide-react v0.453.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const ae=E("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]),re=[{key:"all",label:"All"},{key:"agent",label:"Agents"},{key:"physician",label:"Physicians"},{key:"financial",label:"Financial"},{key:"entrepreneur",label:"Entrepreneurs"},{key:"other",label:"Other"}],C={agent:"bg-amber-500/20 text-amber-300 border-amber-500/30",physician:"bg-green-500/20 text-green-300 border-green-500/30",financial:"bg-blue-500/20 text-blue-300 border-blue-500/30",entrepreneur:"bg-orange-500/20 text-orange-300 border-orange-500/30",other:"bg-slate-500/20 text-slate-300 border-slate-500/30"};function ie({open:s,onOpenChange:x}){const{toast:l}=I(),[o,r]=i.useState(""),[N,u]=i.useState("agent"),[f,v]=i.useState(""),[h,w]=i.useState(""),[m,b]=i.useState(""),[t,n]=i.useState(""),c=O({mutationFn:async()=>(await q("POST","/api/professionals",{displayName:o.trim(),category:N,bio:f.trim()||void 0,expertiseTags:h?h.split(",").map(y=>y.trim()).filter(Boolean):[],territories:m?m.split(",").map(y=>y.trim()).filter(Boolean):[],externalSchedulingUrl:t.trim()||void 0,isPublic:!0})).json(),onSuccess:()=>
6{Y.invalidateQueries({queryKey:["/api/professionals"]}),l({title:"Profile created",description:"You're now listed in the Professional Directory."}),x(!1),r(""),v(""),w(""),b(""),n("")},onError:a=>{l({title:"Error",description:a.message||"Could not save your profile.",variant:"destructive"})}});return e.jsx(F,{open:s,onOpenChange:x,children:e.jsxs(M,{className:"bg-slate-900 border-slate-700 text-white max-w-lg max-h-[90vh] overflow-y-auto",children:[e.jsxs(R,{children:[e.jsx(V,{className:"text-white text-xl",children:"List Yourself"}),e.jsx(z,{className:"text-slate-400",children:"Create your professional profile to connect with athletes and event teams worldwide."})]}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs(p,{className:"text-slate-300",children:["Display Name ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsx(j,{placeholder:"Your name or practice name",value:o,onChange:a=>r(a.target.value),className:"bg-slate-800 border-slate-700 text-white placeholder:text-slate-500","data-testid":"input-display-name"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs(p,{className:"text-slate-300",children:["Category ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsxs(D,{value:N,onValueChange:u,children:[e.jsx(T,{className:"bg-slate-800 border-slate-700 text-white","data-testid":"select-category",children:e.jsx(A,{})}),e.jsxs(L,{children:[e.jsx(d,{value:"agent",children:"Agent"}),e.jsx(d,{value:"physician",children:"Physician / Medical"}),e.jsx(d,{value:"financial",children:"Financial Advisor"}),e.jsx(d,{value:"entrepreneur",children:"Entrepreneur"}),e.jsx(d,{value:"other",children:"Other"})]})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(p,{className:"text-slate-300",children:"Bio"}),e.jsx(ee,{placeholder:"A short description of your background and what you offer athletes...",value:f,onChange:a=>v(a.target.value),rows:3,className:"bg-slate-800 border-slate-700 text-white placeholder:text-slate-500 resize-none","data-testid":"textarea-bio"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs(p,{className:"text-slate-300",children:["Expertise"," ",e.jsx("span",{className:"text-slate-500 font-normal text-xs",children:"(comma-separated)"})]}),e.jsx(j,{placeholder:"e.g. NIL Deals, Contract Negotiation, Sports Law",value:h,onChange:a=>w(a.target.value),className:"bg-slate-800 border-slate-700 text-white placeholder:text-slate-500","data-testid":"input-expertise"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs(p,{className:"text-slate-300",children:["Markets / Territories"," ",e.jsx("span",{className:"text-slate-500 font-normal text-xs",children:"(comma-separated)"})]}),e.jsx(j,{placeholder:"e.g. USA, Europe, UK",value:m,onChange:a=>b(a.target.value),className:"bg-slate-800 border-slate-700 text-white placeholder:text-slate-500","data-testid":"input-territories"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs(p,{className:"text-slate-300",children:["Scheduling Link"," ",e.jsx("span",{className:"text-slate-500 font-normal text-xs",children:"(optional)"})]}),e.jsx(j,{placeholder:"https://calendly.com/your-name",value:t,onChange:a=>n(a.target.value),className:"bg-slate-800 border-slate-700 text-white placeholder:text-slate-500","data-testid":"input-scheduling-url"})]})]}),e.jsxs(G,{className:"gap-2",children:[e.jsx(g,{variant:"outline",onClick:()=>x(!1),className:"border-slate-600 text-slate-300 hover:bg-slate-800",children:"Cancel"}),e.jsx(g,{onClick:()=>c.mutate(),disabled:!o.trim()||c.isPending,className:"bg-amber-500 hover:bg-amber-600 text-black font-semibold","data-testid":"button-submit-profile",children:c.isPending?e.jsxs(e.Fragment,{children:[e.jsx(K,{className:"h-4 w-4 mr-2 animate-spin"}),"Saving..."]}):"Create Profile"})]})]})})}function le({profile:s}){const[,x]=Q(),l=C[s.category]||C.other,o=s.verificationStatus==="verified";return e.jsx(_,{className:"bg-white/5 border-white/10 hover:bg-white/[0.08] transition-colors cursor-pointer",onClick:()=>x(`/professionals/${s.id}`),"data-testid":`card-professional-${s.id}`,children:e.jsx(H,{className:"p-4",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsxs("div",{className:"flex-shrink-0 relative",children:[s.profileImageUrl?e.jsx("img",{src:s.profileImageUrl,alt:s.displayName,className:"w-12 h-12 rounded-full object-cover","data-testid":`img-professional-${s.id}`}):e.jsx("div",{className:"w-12 h-12 rounded-full bg-gradient-to-br from-amber-500 to-orange-600 flex items-center justify-center",children:e.jsx("span",{className:"text-white font-semibold text-lg",children:s.displayName.charAt(0).toUpperCase()})}),o&&e.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 bg-blue-500 rounded-full p-0.5",children:e.jsx(se,{className:"h-3 w-3 text-white"})})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-white font-semibold truncate","data-testid":`text-name-${s.id}`,children:s.displayName}),e.jsx(W,{className:k("text-xs border shrink-0",l),children:s.category})]}),s.bio&&e.jsx("p",{className:"text-white/60 text-sm mt-1 line-clamp-2","data-testid":`text-bio-${s.id}`,children:s.bio}),e.jsxs("div",{className:"flex items-center gap-3 mt-2 flex-wrap",children:[s.territories&&s.territories.length>0&&e.jsxs("span",{className:"flex items-center gap-1 text-white/50 text-xs",children:[e.jsx(Z,{className:"h-3 w-3"}
6),s.territories.slice(0,2).join(", ")]}),s.languages&&s.languages.length>0&&e.jsxs("span",{className:"flex items-center gap-1 text-white/50 text-xs",children:[e.jsx(te,{className:"h-3 w-3"}),s.languages.slice(0,2).join(", ")]}),s.connectionCount>0&&e.jsxs("span",{className:"flex items-center gap-1 text-white/50 text-xs",children:[e.jsx(S,{className:"h-3 w-3"}),s.connectionCount," connections"]})]}),s.expertiseTags&&s.expertiseTags.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1 mt-2",children:[s.expertiseTags.slice(0,3).map(r=>e.jsx("span",{className:"text-xs bg-amber-500/10 text-amber-300 px-2 py-0.5 rounded-full border border-amber-500/20",children:r},r)),s.expertiseTags.length>3&&e.jsxs("span",{className:"text-xs text-white/40",children:["+",s.expertiseTags.length-3]})]})]}),e.jsx("div",{className:"flex flex-col items-end gap-2 shrink-0 ml-1",children:s.externalSchedulingUrl?e.jsxs(g,{size:"sm",className:"bg-amber-500/20 hover:bg-amber-500/30 text-amber-300 border border-amber-500/30 text-xs h-7 px-2",onClick:r=>{r.stopPropagation(),window.open(s.externalSchedulingUrl,"_blank")},"data-testid":`btn-schedule-${s.id}`,children:[e.jsx(J,{className:"h-3 w-3 mr-1"}),"Schedule"]}):e.jsx(X,{className:"h-5 w-5 text-white/30 mt-1"})})]})})})}function ge(){const[s,x]=i.useState("all"),[l,o]=i.useState(""),[r,N]=i.useState(""),[u,f]=i.useState("connections"),[v,h]=i.useState(!1),{data:w=[],isLoading:m}=P({queryKey:["/api/professionals",s,l],queryFn:async()=>{const t=new URLSearchParams;s!=="all"&&t.set("category",s),l&&t.set("search",l);const n=await fetch(`/api/professionals?${t}`);if(!n.ok)return[];const c=await n.json();return Array.isArray(c)?c:[]}}),b=[...w].sort((t,n)=>{if(u==="connections")return n.connectionCount-t.connectionCount;if(u==="alpha")return t.displayName.localeCompare(n.displayName);if(u==="verified"){const c=t.verificationStatus==="verified"?0:1,a=n.verificationStatus==="verified"?0:1;return c!==a?c-a:n.connectionCount-t.connectionCount}return 0});return e.jsxs("div",{className:"min-h-screen bg-black text-white",children:[e.jsx(ie,{open:v,onOpenChange:h}),e.jsx("div",{className:"sticky top-0 z-20 bg-black/90 backdrop-blur-sm border-b border-white/10 p-4",children:e.jsxs("div",{className:"max-w-2xl mx-auto",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-xl font-bold","data-testid":"heading-directory",children:"Professional Directory"}),e.jsx("p",{className:"text-white/50 text-sm",children:"Agents, physicians, financial advisors & entrepreneurs serving athletes worldwide"})]}),e.jsxs(g,{size:"sm",onClick:()=>h(!0),className:"bg-amber-500 hover:bg-amber-600 text-black font-semibold text-xs shrink-0 ml-3","data-testid":"button-setup-profile",children:[e.jsx(U,{className:"h-3 w-3 mr-1"}),"List Yourself"]})]}),e.jsxs("div",{className:"flex gap-2 mb-3",children:[e.jsx(j,{placeholder:"Search by name or expertise...",value:r,onChange:t=>N(t.target.value),onKeyDown:t=>t.key==="Enter"&&o(r),className:"bg-white/10 border-white/20 text-white placeholder:text-white/40","data-testid":"input-search-professionals"}),e.jsx(g,{onClick:()=>o(r),size:"icon",className:"bg-white/10 hover:bg-white/20 shrink-0","data-testid":"button-search-submit",children:e.jsx(B,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex items-center gap-1.5 overflow-x-auto scrollbar-hide flex-1 min-w-0 pb-0.5",children:re.map(t=>e.jsx("button",{onClick:()=>x(t.key),className:k("px-3 py-1.5 rounded-full text-xs font-medium whitespace-nowrap transition-all shrink-0",s===t.key?"bg-amber-500 text-black":"bg-white/10 text-white/70 hover:bg-white/20"),"data-testid":`filter-category-${t.key}`,children:t.label},t.key))}),e.jsxs(D,{value:u,onValueChange:t=>f(t),children:[e.jsxs(T,{className:"bg-white/10 border-white/20 text-white shrink-0 h-8 text-xs w-auto gap-1 pl-2 pr-2","data-testid":"select-sort",children:[e.jsx(ae,{className:"h-3 w-3 shrink-0"}),e.jsx(A,{})]}),e.jsxs(L,{children:[e.jsx(d,{value:"connections",children:"Most Connected"}),e.jsx(d,{value:"alpha",children:"A â Z"}),e.jsx(d,{value:"verified",children:"Verified First"})]})]})]})]})}),e.jsxs("div",{className:"max-w-2xl mx-auto px-4 py-4 space-y-3",children:[m&&e.jsx("div",{className:"space-y-3",children:[1,2,3,4].map(t=>e.jsx("div",{className:"h-28 bg-white/5 rounded-xl animate-pulse"},t))}),!m&&b.length===0&&e.jsxs("div",{className:"text-center py-20",children:[e.jsx(S,{className:"h-16 w-16 mx-auto mb-4 text-white/20"}),e.jsx("h2",{className:"text-xl font-semibold text-white/60 mb-2",children:"No profiles found"}),e.jsx("p",{className:"text-white/40 text-sm mb-6",children:l?`No professionals match "${l}"`:"Be the first to list yourself in this category"}),e.jsxs(g,{onClick:()=>h(!0),className:"bg-amber-500 hover:bg-amber-600 text-black font-semibold","data-testid":"button-be-first",children:["List Yourself",e.jsx($,{className:"h-4 w-4 ml-2"})]})]}),!m&&b.map(t=>e.jsx(le,{profile:t},t.id))]})]})}export{ge 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.