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