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