/* * Copyright (C) 2022 Kristóf Marussy * * This file is part of Sophie. * * Sophie is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . * * SPDX-License-Identifier: AGPL-3.0-only */ import AttachmentIcon from '@mui/icons-material/Attachment'; import Link from '@mui/material/Link'; import { styled } from '@mui/material/styles'; import type { Certificate, CertificatePrincipal } from '@sophie/shared'; import type { TFunction } from 'i18next'; import { observer } from 'mobx-react-lite'; import React, { type ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; const SingleCertificateDetailsRoot = styled('table')(({ theme }) => ({ width: '100%', borderSpacing: `${theme.spacing(2)} 0`, })); const Header = styled('th')({ textAlign: 'right', whiteSpace: 'nowrap', verticalAlign: 'top', }); const SectionHeader = styled(Header)(({ theme }) => ({ padding: `${theme.spacing(2)} 0`, fontWeight: theme.typography.fontWeightBold, })); const SubHeader = styled(Header)(({ theme }) => ({ color: theme.palette.text.secondary, fontWeight: theme.typography.fontWeightMedium, })); const Cell = styled('td')({ verticalAlign: 'top', }); function Section({ id, label }: { id: string; label: string }): JSX.Element { return ( {label}