import{jsx as n}from"react/jsx-runtime";import{memo as i}from"react";import{markdownLinksCss as m}from"@redocly/theme/components/Markdown/styles/links";import{normalizeText as a}from"../../utils/index.js";import{styled as e}from"../../styled-components.js";const l=e.div`
  ${m};
  ${({compact:r})=>r?"":"margin: var(--spacing-sm) 0 0"}
`;function p({externalDocs:r,compact:o}){if(!r||!r.url)return null;const t=a(r.description);return n(l,{compact:o,"data-testid":"external-documentation",children:n("a",{href:r.url,target:"_blank",rel:"noreferrer","aria-label":t||r.url,children:t||r.url})})}const k=i(p);export{k as ExternalDocumentation};
