"use client" import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faFilePdf, faChevronDown, faCheckCircle, faMoneyBillWave, faFileText, faChevronLeft, faChevronRight, faAngleDoubleLeft, faAngleDoubleRight } from '@fortawesome/free-solid-svg-icons'; import { useState } from 'react'; import documentsData from '@/data/documents.json'; import { useTranslation } from 'react-i18next'; interface TableCellProps { children: React.ReactNode; className?: string; } const TableCell = ({ children, className = "" }: TableCellProps) => ( {children} ); const StatusBadge = ({ status }: { status: string }) => { const { t } = useTranslation(); if (status === t('approved', 'Одобрено')) { return ( ); } return ( ); }; const PriceBadge = ({ price }: { price: number }) => { const { t } = useTranslation(); if (price === 0) { return {t('free', '0,00')}; } return {price.toFixed(2)}; }; export default function DocumentsPage() { const [selectedDocumentType, setSelectedDocumentType] = useState("select_document"); const [isDropdownOpen, setIsDropdownOpen] = useState(false); const [comment, setComment] = useState(""); const [currentPage, setCurrentPage] = useState(1); const [recordsPerPage, setRecordsPerPage] = useState(15); const { t } = useTranslation(); const selectedDocument = documentsData.documentTypes.find(d => d.id === selectedDocumentType); const { documents, paymentInfo } = documentsData; const totalPages = Math.ceil(documents.length / recordsPerPage); const startIndex = (currentPage - 1) * recordsPerPage; const endIndex = startIndex + recordsPerPage; const currentDocuments = documents.slice(startIndex, endIndex); return (
{/* Header */}

{t('documents')}

{t('documents_overview', 'Преглед на вашите документи и нивниот статус.')}

{/* Document Request Form */}

{t('new_document_request', 'Ново барање за документ')}

{/* Document Type Selection */}
{isDropdownOpen && (
{documentsData.documentTypes.map((docType) => ( ))}
)}
{/* Comment Section */}