// @bun
import{StatusChip as N}from"@contractspec/lib.design-system";import{HStack as I}from"@contractspec/lib.ui-kit-web/ui/stack";import{ArrowRight as Q,Layout as V,Radio as W,Shield as X,Tag as Y,Users as _,Zap as $}from"lucide-react";import{jsx as z,jsxs as B,Fragment as y}from"react/jsx-runtime";function T({feature:O}){let{meta:E,operations:J,events:K,presentations:M,capabilities:D}=O,P=D?.provides?.length||D?.requires?.length;return B(y,{children:[E.description&&z("p",{className:"text-muted-foreground text-sm leading-relaxed",children:E.description}),B(I,{gap:"md",className:"py-2",children:[J?.length?B("div",{className:"flex items-center gap-1.5 text-sm",children:[z($,{className:"h-4 w-4 text-amber-500"}),z("span",{className:"font-medium",children:J.length}),z("span",{className:"text-muted-foreground",children:"ops"})]}):null,K?.length?B("div",{className:"flex items-center gap-1.5 text-sm",children:[z(W,{className:"h-4 w-4 text-blue-500"}),z("span",{className:"font-medium",children:K.length}),z("span",{className:"text-muted-foreground",children:"events"})]}):null,M?.length?B("div",{className:"flex items-center gap-1.5 text-sm",children:[z(V,{className:"h-4 w-4 text-purple-500"}),z("span",{className:"font-medium",children:M.length}),z("span",{className:"text-muted-foreground",children:"views"})]}):null]}),P&&B("div",{className:"space-y-1.5 border-border/50 border-t pt-1",children:[D?.provides?.length?B(I,{gap:"xs",wrap:"wrap",className:"items-start",children:[z(X,{className:"mt-0.5 h-3.5 w-3.5 text-emerald-500"}),z("span",{className:"text-muted-foreground text-xs",children:"Provides:"}),D.provides.slice(0,2).map((G)=>z(N,{tone:"success",label:G.key,size:"sm"},G.key)),D.provides.length>2&&B("span",{className:"text-muted-foreground text-xs",children:["+",D.provides.length-2]})]}):null,D?.requires?.length?B(I,{gap:"xs",wrap:"wrap",className:"items-start",children:[z(Q,{className:"mt-0.5 h-3.5 w-3.5 text-blue-500"}),z("span",{className:"text-muted-foreground text-xs",children:"Requires:"}),D.requires.slice(0,2).map((G)=>z(N,{tone:"info",label:G.key,size:"sm"},G.key)),D.requires.length>2&&B("span",{className:"text-muted-foreground text-xs",children:["+",D.requires.length-2]})]}):null]}),E.tags?.length?B(I,{gap:"xs",wrap:"wrap",className:"items-center border-border/50 border-t pt-1",children:[z(Y,{className:"h-3.5 w-3.5 text-muted-foreground"}),E.tags.slice(0,4).map((G)=>B("span",{className:"rounded bg-muted px-1.5 py-0.5 text-muted-foreground text-xs",children:["#",G]},G)),E.tags.length>4&&B("span",{className:"text-muted-foreground text-xs",children:["+",E.tags.length-4]})]}):null,E.owners?.length?B(I,{gap:"xs",className:"items-center text-muted-foreground text-xs",children:[z(_,{className:"h-3.5 w-3.5"}),z("span",{children:E.owners.join(", ")})]}):null]})}export{T as FeatureHoverPreview};
