import React from 'react';
import { Typography } from '@mui/material';
import LegalPage from './LegalPage.js';
import { useTranslation } from 'react-i18next';

const Impressum = () => {
  const { t } = useTranslation('legal-impressum');
  
  const content = (
    <>
      {['operator', 'contact', 'vatId', 'disclaimer', 'copyright'].map(section => (
        <React.Fragment key={section}>
          <Typography variant="h6" gutterBottom sx={{ mt: section === 'operator' ? 0 : 3 }}>
            {t ? t(`sections.${section}.title`) : `Section ${section} title`}
          </Typography>
          <Typography variant="body1" paragraph>
            {t ? t(`sections.${section}.content`) : `Section ${section} content`}
          </Typography>
        </React.Fragment>
      ))}
    </>
  );

  return <LegalPage title={t ? t('title') : 'Impressum'} content={content} />;
};

export default Impressum; 