// @bun
var X=Object.defineProperty;var Y=(y)=>y;function Z(y,z){this[y]=Y.bind(null,z)}var V=(y,z)=>{for(var P in z)X(y,P,{get:z[P],enumerable:!0,configurable:!0,set:Z.bind(z,P)})};var N=(y,z)=>()=>(y&&(z=y(y=0)),z);import{StatCard as M,StatCardGroup as _,StatusChip as A}from"@contractspec/lib.design-system";import{Box as K,HStack as I,VStack as $}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as v}from"@contractspec/lib.ui-kit-web/ui/utils";import O from"next/link";import{jsx as D,jsxs as E}from"react/jsx-runtime";var G={stable:"success",beta:"warning",experimental:"info",deprecated:"danger"};function T({feature:y,className:z}){let{meta:P,operations:Q,events:R,presentations:U,capabilities:J}=y,W=G[P.stability]??"neutral";return E($,{gap:"lg",className:v("w-full",z),children:[E(I,{gap:"sm",children:[D(A,{tone:W,label:P.stability??"unknown"}),D(A,{tone:"neutral",label:P.key,size:"sm"}),D(A,{tone:"neutral",label:`v${P.version}`,size:"sm"})]}),E(_,{children:[D(O,{href:`./${y.meta.key}/operations`,children:D(M,{label:"Operations",value:Q?.length??0})}),D(O,{href:`./${y.meta.key}/events`,children:D(M,{label:"Events",value:R?.length??0})}),D(O,{href:`./${y.meta.key}/presentations`,children:D(M,{label:"Presentations",value:U?.length??0})})]}),J?.provides?.length?E(K,{className:"flex-col rounded-lg border p-4",gap:"sm",align:"start",children:[D("span",{className:"font-semibold",children:"Provides Capabilities"}),D(I,{gap:"xs",wrap:"wrap",children:J.provides.map((F)=>D(A,{tone:"success",label:`${F.key} v${F.version}`,size:"sm"},`${F.key}-${F.version}`))})]}):null,J?.requires?.length?E(K,{className:"flex-col rounded-lg border p-4",gap:"sm",align:"start",children:[D("span",{className:"font-semibold",children:"Requires Capabilities"}),D(I,{gap:"xs",wrap:"wrap",children:J.requires.map((F)=>D(A,{tone:"info",label:`${F.key}${F.version?` v${F.version}`:""}${F.optional?" (optional)":""}`,size:"sm"},F.key))})]}):null,P.tags?.length?E(K,{className:"flex-col rounded-lg border p-4",gap:"sm",align:"start",children:[D("span",{className:"font-semibold",children:"Tags"}),D(I,{gap:"xs",wrap:"wrap",children:P.tags.map((F)=>D(A,{tone:"neutral",label:`#${F}`,size:"sm"},F))})]}):null,P.owners?.length?E(K,{className:"flex-col rounded-lg border p-4",gap:"sm",align:"start",children:[D("span",{className:"font-semibold",children:"Owners"}),D(I,{gap:"xs",wrap:"wrap",children:P.owners.map((F)=>D(A,{tone:"neutral",label:F,size:"sm"},F))})]}):null]})}export{T as FeatureDetail};
