1import{j as e,C as t,d as n,b as d,p as l,af as o,Q as h,e as x,a as m,U as j,T as u,g as p}from"./index-CT3mG8No.js";import{C as N}from"./chart-pie-Dk9lMnEK.js";function g({data:r}){var c,i;return r?e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[e.jsxs(t,{className:"bg-card border-border/50",children:[e.jsx(d,{className:"pb-2",children:e.jsxs(l,{className:"text-sm flex items-center gap-2",children:[e.jsx(N,{className:"w-4 h-4 text-primary"}),"Ownership Breakdown"]})}),e.jsx(n,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"p-3 rounded bg-secondary/20 border border-border/30",children:[e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Institutional"}),e.jsxs("span",{className:"font-mono text-lg font-bold text-foreground",children:[r.institutionalPercent,"%"]})]}),e.jsx(o,{value:r.institutionalPercent,className:"h-2"})]}),e.jsxs("div",{className:"p-3 rounded bg-secondary/20 border border-border/30",children:[e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Insider"}),e.jsxs("span",{className:"font-mono text-lg font-bold text-foreground",children:[r.insiderPercent,"%"]})]}),e.jsx(o,{value:r.insiderPercent,className:"h-2"})]}),e.jsxs("div",{className:"p-3 rounded bg-secondary/20 border border-border/30",children:[e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Retail"}),e.jsxs("span",{className:"font-mono text-lg font-bold text-foreground",children:[r.retailPercent,"%"]})]}),e.jsx(o,{value:r.retailPercent,className:"h-2"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[e.jsxs("div",{className:"p-2 rounded bg-secondary/20 border border-border/30",children:[e.jsx("span",{className:"text-muted-foreground",children:"Inst. Count"}),e.jsx("p",{className:"font-mono text-foreground",children:r.institutionalCount})]}),e.jsxs("div",{className:"p-2 rounded bg-secondary/20 border border-border/30",children:[e.jsx("span",{className:"text-muted-foreground",children:"Float"}),e.jsxs("p",{className:"font-mono text-foreground",children:[r.floatPercent,"%"]})]})]})]})})]}),e.jsxs(t,{className:"bg-card border-border/50",children:[e.jsx(d,{className:"pb-2",children:e.jsxs(l,{className:"text-sm flex items-center gap-2",children:[e.jsx(h,{className:"w-4 h-4 text-primary"}),"Top Institutional Holders"]})}),e.jsx(n,{children:e.jsx(x,{className:"h-[350px]",children:e.jsx("div",{className:"space-y-2",children:(c=r.topInstitutions)==null?void 0:c.map((s,a)=>e.jsxs("div",{className:"p-3 rounded border border-border/50 bg-secondary/20",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-foreground",children:s.name}),e.jsxs(m,{variant:s.changePercent>=0?"default":"destructive",className:"text-[10px]",children:[s.changePercent>=0?"+":"",s.changePercent,"%"]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Shares"}),e.jsx("p",{className:"font-mono text-foreground",children:s.shares})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Value"}),e.jsx("p",{className:"font-mono text-foreground",children:s.value})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"% Out"}),e.jsxs("p",{className:"font-mono text-foreground",children:[s.percentOut,"%"]})]})]})]},a))})})})]}),e.jsxs(t,{className:"bg-card border-border/50",children:[e.jsx(d,{className:"pb-2",children:e.jsxs(l,{className:"text-sm flex items-center gap-2",children:[e.jsx(j,{className:"w-4 h-4 text-primary"}),"Recent Institutional Changes"]})}),e.jsxs(n,{children:[e.jsxs("div",{className:"mb-4 grid grid-cols-2 gap-2",children:[e.jsxs("div",{className:"p-2 rounded bg-profit/10 border border-profit/30 text-center",children:[e.jsx(u,{className:"w-4 h-4 mx-auto text-profit mb-1"}),e.jsx("p",{className:"text-lg font-mono font-bold text-profit",children:r.newPositions}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:"New Positions"})]}),e.jsxs("div",{className:"p-2 rounded bg-loss/10 border border-loss/30 text-center",children:[e.jsx(p,{className:"w-4 h-4 mx-auto text-loss mb-1"}),e.jsx("p",{className:"text-lg font-mono font-bold text-loss",children:r.closedPositions}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Closed Positions"})]})]}),e.jsx(x,{className:"h-[250px]",children:e.jsx("div",{className:"space-y-2",children:(i=r.recentChanges)==null?void 0:i.map((s,a)=>e.jsxs("div",{className:"p-2 rounded border border-border/50 bg-secondary/20",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-foreground",children:s.institution}),e.jsx(m,{variant:s.action==="NEW"||s.action==="ADD"?"default":"destructive",className:"text-[10px]",children:s.action})]}),e.jsxs("div",{className:"flex justify-between text-[10px] mt-1",children:[e.jsxs("span",{className:"text-muted-foreground",children:[s.shares," shares"]}),e.jsxs("span",{className:s.changePercent>=0?"text-profit":"text-loss",children:[s.changePercent>=0?"+":"",s.changePercent,"%"]})]})]},a))})})]})]})]}):e.jsx(t,{className:"bg-card border-border/50",children:e.jsx(n,{className:"py-12 text-center",children:e.jsx("p",{className:"text-muted-foreground",children:"Ownership data not available"})})})}export{g as OwnershipPanel};
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.