import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { CopyButton } from '@redocly/theme/components/Buttons/CopyButton';
import { NewTabButton } from '@redocly/theme/components/Buttons/NewTabButton';
import { EmailButton } from '@redocly/theme/components/Buttons/EmailButton';
import { PanelItem, PanelItemDescription, PanelItemsList } from '../PanelItem/index.js';
export function Overview({ info, translate }) {
    const website = (info.contact && info.contact.url && (_jsx(PanelItem, { header: _jsx(PanelItemDescription, { children: translate('openapi.info.contact.url', 'URL') }), title: _jsx("a", { href: info.contact.url, target: "_blank", rel: "noreferrer", children: info.contact.url }), actions: [_jsx(NewTabButton, { data: info.contact.url }, "NewTabButton")] }))) ||
        null;
    const email = (info.contact && info.contact.email && (_jsx(PanelItem, { header: _jsx(PanelItemDescription, { children: info.contact.name || translate('openapi.info.contact.name', 'E-mail') }), title: _jsx("a", { href: 'mailto:' + info.contact.email, children: info.contact.email }), actions: [
            _jsx(CopyButton, { data: info.contact.email }, "CopyButton"),
            _jsx(EmailButton, { data: info.contact.email }, "EmailButton"),
        ] }))) ||
        null;
    const license = (info.license && (_jsx(PanelItem, { header: _jsx(PanelItemDescription, { children: translate('openapi.info.license', 'License') }), title: info.license.identifier ? (info.license.identifier) : (_jsx("a", { href: info.license.url, target: "_blank", rel: "noreferrer", children: info.license.name })), actions: [_jsx(NewTabButton, { data: info.license.url || '' }, "NewTabButton")] }))) ||
        null;
    const terms = (info.termsOfService && (_jsx(PanelItem, { title: _jsx("a", { href: info.termsOfService, target: "_blank", rel: "noreferrer", children: translate('openapi.info.termsOfService', 'Terms of Service') }), actions: [_jsx(NewTabButton, { data: info.termsOfService }, info.termsOfService)] }))) ||
        null;
    return (_jsx(_Fragment, { children: _jsxs(PanelItemsList, { children: [website, email, license, terms] }) }));
}
//# sourceMappingURL=Overview.js.map