"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SectionItem=void 0;const jsx_runtime_1=require("react/jsx-runtime"),react_1=require("react"),theme_1=require("@redocly/theme"),common_1=require("../common"),Markdown_1=require("../Markdown"),ExternalDocumentation_1=require("../ExternalDocumentation");function SectionItemComponent({item:e,layout:t}){const{externalDocs:n,ast:r,description:o}=e,i=t===theme_1.LayoutVariant.STACKED,m=!e.parent||"tag"!==e.parent.type;return(0,jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment,{children:[(0,jsx_runtime_1.jsx)(Markdown_1.Markdown,{ast:r,source:o,htmlWrap:e=>(0,jsx_runtime_1.jsx)(common_1.SamplesMiddlePanel,{compact:!0,fullWidth:m,isStacked:i,children:e})}),n&&(0,jsx_runtime_1.jsx)(common_1.Row,{children:(0,jsx_runtime_1.jsx)(common_1.SamplesMiddlePanel,{compact:!0,fullWidth:m,isStacked:i,children:(0,jsx_runtime_1.jsx)(ExternalDocumentation_1.ExternalDocumentation,{externalDocs:n})})})]})}exports.SectionItem=(0,react_1.memo)(SectionItemComponent);
//# sourceMappingURL=SectionItem.js.map