import React from 'react';
import { Box, Heading, ListItem, UnorderedList } from '@chakra-ui/react';
import { useTranslation } from 'react-i18next';
import { v4 as uuid } from 'uuid';
import { ProvisioningVenueNotificationMessage } from 'contexts/ProvisioningSocketProvider/utils';
interface Props {
notification: ProvisioningVenueNotificationMessage['notification'];
}
const DeviceUpgradeNotificationContent = ({ notification }: Props) => {
const { t } = useTranslation();
return (
<>
{t('inventory.successful_upgrades', {
count: notification?.content?.success?.length ?? 0,
})}
{notification?.content?.success && (
{notification?.content?.success.map((serialNumber) => (
{serialNumber}
))}
)}
{t('inventory.not_connected', { count: notification?.content?.notConnected?.length ?? 0 })}
{notification?.content?.notConnected && (
{notification?.content?.notConnected.map((serialNumber) => (
{serialNumber}
))}
)}
{t('inventory.no_firmware', { count: notification?.content?.noFirmware?.length ?? 0 })}
{notification?.content?.noFirmware && (
{notification?.content?.noFirmware.map((serialNumber) => (
{serialNumber}
))}
)}
{t('inventory.skipped_upgrades', { count: notification?.content?.skipped?.length ?? 0 })}
{notification?.content?.skipped && (
{notification?.content?.skipped.map((serialNumber) => (
{serialNumber}
))}
)}
>
);
};
export default DeviceUpgradeNotificationContent;