import{jsx as t,jsxs as s,Fragment as p}from"react/jsx-runtime";import{CopyButton as d}from"@redocly/theme/components/Buttons/CopyButton";import{NewTabButton as a}from"@redocly/theme/components/Buttons/NewTabButton";import{EmailButton as u}from"@redocly/theme/components/Buttons/EmailButton";import{Tooltip as h}from"@redocly/theme/components/Tooltip/Tooltip";import{PanelItem as c,PanelItemDescription as n,PanelItemsList as b}from"../PanelItem/index.js";function S({info:e,translate:r}){const l=e.contact&&e.contact.url&&t(c,{header:t(n,{children:r("openapi.info.contact.url","URL")}),title:t("a",{href:e.contact.url,target:"_blank",rel:"noreferrer",children:e.contact.url}),actions:[t(a,{data:e.contact.url},"NewTabButton")]})||null,i=e.contact&&e.contact.email&&t(c,{header:t(n,{children:e.contact.name||r("openapi.info.contact.name","E-mail")}),title:t("a",{href:"mailto:"+e.contact.email,children:e.contact.email}),actions:[t(h,{tip:r("button.copy.tooltipText","Copy to clipboard"),placement:"top",arrowPosition:"right",children:t(d,{data:e.contact.email})},"CopyButton"),t(u,{data:e.contact.email},"EmailButton")]})||null,o=e.license&&t(c,{header:t(n,{children:r("openapi.info.license","License")}),title:e.license.identifier?e.license.identifier:t("a",{href:e.license.url,target:"_blank",rel:"noreferrer",children:e.license.name}),actions:[t(a,{data:e.license.url||""},"NewTabButton")]})||null,m=e.termsOfService&&t(c,{title:t("a",{href:e.termsOfService,target:"_blank",rel:"noreferrer",children:r("openapi.info.termsOfService","Terms of Service")}),actions:[t(a,{data:e.termsOfService},e.termsOfService)]})||null;return t(p,{children:s(b,{children:[l,i,o,m]})})}export{S as Overview};
