import{StatCard as O,StatCardGroup as _,StatusChip as E}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 G}from"@contractspec/lib.ui-kit-web/ui/utils";import P from"next/link";import{jsx as y,jsxs as F}from"react/jsx-runtime";var R={stable:"success",beta:"warning",experimental:"info",deprecated:"danger"};function Q({feature:A,className:M}){let{meta:D,operations:W,events:X,presentations:Y,capabilities:J}=A,Z=R[D.stability]??"neutral";return F($,{gap:"lg",className:G("w-full",M),children:[F(I,{gap:"sm",children:[y(E,{tone:Z,label:D.stability??"unknown"}),y(E,{tone:"neutral",label:D.key,size:"sm"}),y(E,{tone:"neutral",label:`v${D.version}`,size:"sm"})]}),F(_,{children:[y(P,{href:`./${A.meta.key}/operations`,children:y(O,{label:"Operations",value:W?.length??0})}),y(P,{href:`./${A.meta.key}/events`,children:y(O,{label:"Events",value:X?.length??0})}),y(P,{href:`./${A.meta.key}/presentations`,children:y(O,{label:"Presentations",value:Y?.length??0})})]}),J?.provides?.length?F(K,{className:"flex-col rounded-lg border p-4",gap:"sm",align:"start",children:[y("span",{className:"font-semibold",children:"Provides Capabilities"}),y(I,{gap:"xs",wrap:"wrap",children:J.provides.map((z)=>y(E,{tone:"success",label:`${z.key} v${z.version}`,size:"sm"},`${z.key}-${z.version}`))})]}):null,J?.requires?.length?F(K,{className:"flex-col rounded-lg border p-4",gap:"sm",align:"start",children:[y("span",{className:"font-semibold",children:"Requires Capabilities"}),y(I,{gap:"xs",wrap:"wrap",children:J.requires.map((z)=>y(E,{tone:"info",label:`${z.key}${z.version?` v${z.version}`:""}${z.optional?" (optional)":""}`,size:"sm"},z.key))})]}):null,D.tags?.length?F(K,{className:"flex-col rounded-lg border p-4",gap:"sm",align:"start",children:[y("span",{className:"font-semibold",children:"Tags"}),y(I,{gap:"xs",wrap:"wrap",children:D.tags.map((z)=>y(E,{tone:"neutral",label:`#${z}`,size:"sm"},z))})]}):null,D.owners?.length?F(K,{className:"flex-col rounded-lg border p-4",gap:"sm",align:"start",children:[y("span",{className:"font-semibold",children:"Owners"}),y(I,{gap:"xs",wrap:"wrap",children:D.owners.map((z)=>y(E,{tone:"neutral",label:z,size:"sm"},z))})]}):null]})}import{Breadcrumbs as T,PageHeaderResponsive as v}from"@contractspec/lib.design-system";import{VStack as V}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as L}from"@contractspec/lib.ui-kit-web/ui/utils";import{jsx as U,jsxs as N}from"react/jsx-runtime";function m({feature:A,className:M}){return N(V,{gap:"lg",className:L("mx-auto w-full max-w-5xl p-6",M),children:[U(v,{title:A.meta.title||A.meta.key,subtitle:A.meta.description||"Feature overview",breadcrumb:U(T,{items:[{label:"Features",href:"/features"},{label:A.meta.title||A.meta.key}]})}),U(Q,{feature:A})]})}export{m as FeatureOverviewTemplate};
