import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{Markdown as MarkdownWrapper,Panel}from"@redocly/theme";import{useAtomValue}from"jotai";import{DownloadSpecification}from"../Download";import{Overview}from"../Overview";import{LanguageList}from"../Language";import{ServerList}from"../ServerList";import{globalStoreAtom}from"../../jotai/store";import{normalizeServers}from"../../utils";import{mergeInMockServer}from"../../models/operation";import{languageAtom}from"../../jotai/app";export const RightPanel=({item:{infoDefinition:e}})=>{const{options:{hideDownloadButtons:r,mockServer:a},parser:{definition:o,definitionUrl:n}}=useAtomValue(globalStoreAtom),{languages:i,activeLanguage:s}=useAtomValue(languageAtom),t=normalizeServers(n,mergeInMockServer(o.servers||[],a));return _jsxs(_Fragment,{children:[!r&&_jsx(Panel,{className:"panel-download",header:"Download OpenAPI description",isExpandable:!1,children:_jsx(DownloadSpecification,{})}),((null==e?void 0:e.license)||(null==e?void 0:e.contact)||(null==e?void 0:e.termsOfService))&&_jsx(Panel,{className:"panel-overview",header:"Overview",isExpandable:!1,children:_jsx(MarkdownWrapper,{children:_jsx(Overview,{info:e})})}),!!(null==i?void 0:i.length)&&_jsx(Panel,{className:"panel-language-list",header:"Languages",isExpandable:!1,children:_jsx(LanguageList,{languages:i,activeLanguage:s})}),!!t.length&&_jsx(Panel,{className:"panel-servers-list",header:"Servers",isExpandable:!1,children:_jsx(ServerList,{servers:t,path:"/"})})]})};
//# sourceMappingURL=RightPanel.js.map