import React from 'react'; import styled from 'styled-components'; import type { JSX } from 'react'; import { useThemeHooks } from '@redocly/theme/core/hooks'; import { LanguagePicker } from '@redocly/theme/components/LanguagePicker/LanguagePicker'; export type FooterCopyrightProps = { copyrightText: string; className?: string; }; export function FooterCopyright({ copyrightText = '', className, }: FooterCopyrightProps): JSX.Element | null { const { useTranslate, useL10n } = useThemeHooks(); const { translate } = useTranslate(); const { changeLanguage } = useL10n(); return copyrightText ? ( {translate('footer.copyrightText', copyrightText)} ) : null; } const FooterCopyrightWrapper = styled.section` display: flex; justify-content: space-between; align-items: center; font-size: var(--footer-copyright-font-size); background-color: var(--footer-bg-color); color: var(--footer-text-color); text-align: var(--footer-copyright-text-align); gap: var(--spacing-xs); span { max-width: var(--footer-container-max-width); } `; const FooterCopyrightLabel = styled.div` padding: var(--footer-link-padding-vertical) var(--footer-link-padding-horizontal); `;