1import{j as e}from"./vendor-ui-CEGjIuqP.js";import{u as x}from"./vendor-data-CqtBkUbK.js";import{N as r,L as u,F as t,B as l,A as m,f as b,s as p}from"./index-DgkqAiwu.js";import{l as h,h as j}from"./vendor-react-BT-Op1j_.js";import"./vendor-charts-F376sfYw.js";import"./vendor-editor-CAsPUtf2.js";import"./vendor-dnd-D3FEUJ2d.js";const k=()=>{const{slug:s}=h(),i=j(),{data:a,isLoading:c}=x({queryKey:["board-member-detail",s],queryFn:async()=>{const o=(s??"").trim();if(!o)return null;const{data:d,error:n}=await p.from("board_members").select("id, name, slug, title, company, photo_url, bio, is_active").eq("slug",o).eq("is_active",!0).maybeSingle();if(n)throw n;return d},enabled:!!s});return c?e.jsxs(e.Fragment,{children:[e.jsx(r,{}),e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:e.jsx(u,{className:"h-8 w-8 animate-spin text-primary"})}),e.jsx(t,{})]}):a?e.jsxs(e.Fragment,{children:[e.jsx(b,{titlePrefix:a.name,description:a.bio||`${a.name}${a.title?`, ${a.title}`:""}${a.company?` at ${a.company}`:""}`}),e.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[e.jsx(r,{}),e.jsx("main",{className:"flex-1 pt-page",children:e.jsxs("div",{className:"container mx-auto px-4 py-8 max-w-3xl",children:[e.jsxs(l,{onClick:()=>i("/advisory-board"),variant:"outline",className:"gap-2 mb-6",children:[e.jsx(m,{className:"h-4 w-4"}),"Back to Advisory Board"]}),e.jsxs("div",{className:"border border-border rounded-xl p-8 bg-card shadow-sm",children:[a.photo_url&&e.jsx("div",{className:"mb-6",children:e.jsx("img",{src:a.photo_url,alt:a.name,className:"max-h-64 object-cover rounded-lg"})}),e.jsx("h1",{className:"text-2xl md:text-3xl font-bold mb-2",children:a.name}),a.title&&e.jsx("p",{className:"text-muted-foreground mb-1",children:a.title}),a.company&&e.jsx("p",{className:"text-primary font-medium mb-6",children:a.company}),a.bio&&e.jsx("p",{className:"text-muted-foreground leading-relaxed whitespace-pre-line",children:a.bio})]})]})}),e.jsx(t,{})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(r,{}),e.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center bg-background gap-4",children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Board member not found"}),e.jsxs(l,{onClick:()=>i("/advisory-board"),variant:"outline",className:"gap-2",children:[e.jsx(m,{className:"h-4 w-4"}),"Back to Advisory Board"]})]}),e.jsx(t,{})]})};export{k 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.