import{ExampleCatalogDataView as F}from"@contractspec/lib.contracts-spec/docs";import{ButtonLink as G,DataViewList as O,StatusChip as Q}from"@contractspec/lib.design-system";import{HStack as R,VStack as I}from"@contractspec/lib.ui-kit-web/ui/stack";import{H1 as T,Muted as J}from"@contractspec/lib.ui-kit-web/ui/typography";import{buildExampleDocsHref as U,listPublicExamples as W}from"@contractspec/module.examples";import{jsx as v,jsxs as A}from"react/jsx-runtime";function f(){let K=W().map((q)=>{let z=q.meta.title??q.meta.key;return{id:q.meta.key,title:z,summary:q.meta.summary??q.meta.description,route:U(q.meta.key),tags:q.meta.tags,sandboxEnabled:q.surfaces.sandbox.enabled}}).sort((q,z)=>q.title.localeCompare(z.title)),N={...F,view:{...F.view,kind:"list"}};return A(I,{gap:"xl",children:[A(I,{gap:"sm",children:[v(T,{children:"Examples"}),v(J,{children:"Reference implementations for real ContractSpec surfaces. Use them to study adoption patterns, inspect generated artifacts, and validate the OSS workflow against runnable systems."})]}),v(O,{spec:N,items:K,emptyState:v(J,{children:"No examples available."}),renderActions:(q)=>{return A(R,{gap:"xs",justify:"end",children:[q.sandboxEnabled?v(G,{href:`/sandbox?template=${q.id}`,size:"sm",variant:"outline",children:"Sandbox"}):null,v(G,{href:q.route,size:"sm",children:"Reference"}),q.tags?.[0]?v(Q,{size:"sm",label:q.tags[0]}):null]})}})]})}export{f as DocsExamplesPage};
