import{jsx as t,jsxs as i}from"react/jsx-runtime";import{useMemo as c}from"react";import{Markdown as d}from"@redocly/theme/components/Markdown/Markdown";import{H3 as a}from"@redocly/theme/components/Typography/H3";import{isNotNull as p}from"@redocly/theme/core/openapi";const s=["title","description"];function f([e,r]){return s.includes(e)?null:Array.isArray(r)?{key:e,value:r.filter(n=>typeof n!="object").join(", ")}:typeof r=="object"?null:{key:e,value:r}}function b({metadata:e,translate:r}){const n=c(()=>Object.entries(e||{}).map(f).filter(p),[e]);return e?i(d,{children:[t(a,{children:r("openapi.info.metadata.title","Metadata")}),i("table",{className:"md",children:[t("thead",{children:i("tr",{children:[t("th",{scope:"col",children:r("openapi.key","Key")}),t("th",{scope:"col",children:r("openapi.value","Value")})]})}),t("tbody",{children:n.map(({key:o,value:l})=>i("tr",{children:[t("td",{children:o}),t("td",{children:`${l}`})]},o))})]})]}):null}export{b as Metadata};
