'use client' import { useTranslations } from 'next-intl'; import { IconCheck } from '@/app/ui/icons/icons'; import { useState } from 'react'; interface Notification { id: string, notificationText: string, data: string, link: string, title: string, status: string, } const noitficationList: Notification[] = [ { id: '1', notificationText: 'text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1', data: '20.20.20', link: '#', title: 'title 1', status: 'status' }, { id: '2', notificationText: 'text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 ', data: '20.20.20', link: '#', title: 'title 2', status: 'status' }, { id: '3', notificationText: 'text3 text3 text3 text3 text3 text3 text3 text3 text3 text3 text3 text3 text3 text3 text3 text3 text3 text3 text3 text3 text3 text3 text3 text3 ', data: '20.20.20', link: '#', title: 'title 3', status: 'status' }, { id: '4', notificationText: 'text4 text4 text4 text4 text4 text4 text4 text4 text4 text4 text4 text4 text4 text4 text4 text4 text4 text4 text4 text4 text4 text4 text4 text4 text4 ', data: '20.20.20', link: '#', title: 'title 4', status: 'status' }, { id: '5', notificationText: 'text5 text5 text5 text5 text5 text5 text5 text5 text5 text5 text5 text5 text5 text5 text5 text5 text5 text5 text5 text5 text5 text5 text5 text5 text5 ', data: '20.20.20', link: '#', title: 'title 5', status: 'status' } ]; export function NotificationsList() { const t = useTranslations('Global'); const [selectedFiles, setSelectedFiles] = useState>(new Set()); function selectHandler(fileId: string) { setSelectedFiles((prev) => { const newSet = new Set(prev); if (newSet.has(fileId)) { newSet.delete(fileId) } else { newSet.add(fileId) } return newSet; }); } function clearHandler() { setSelectedFiles(new Set()); } function selectAllHandler() { setSelectedFiles(new Set(noitficationList.map(item => item.id))); } return (

{t('all-notifications')}

{(selectedFiles.size !== 0) && ( )}
{(noitficationList.length !== 0) && ( noitficationList.map(item => { return (
{item.title}
{item.status}
{item.notificationText}
{item.data}
) }) )}
) }