'use client' import * as React from 'react' import Link from 'next/link' import { useTranslations } from 'next-intl' import { Button } from '@/components/ui/button' import { cn } from '@/lib/utils' import { Receipt, Users, ArrowLeftRight, Camera, Building2, FileText, Calendar, Plus, type LucideIcon, } from 'lucide-react' import { SupportLink } from '@/components/ui/support-link' interface EmptyStateProps { icon?: LucideIcon title: string description: string actionLabel?: string actionHref?: string onAction?: () => void secondaryActionLabel?: string secondaryActionHref?: string supportHint?: boolean className?: string children?: React.ReactNode } /** * EmptyState — friendly placeholder shown when there is no data. */ export function EmptyState({ icon: Icon, title, description, actionLabel, actionHref, onAction, secondaryActionLabel, secondaryActionHref, supportHint, className, children, }: EmptyStateProps) { const t = useTranslations('empty') return (
{Icon && (
)}

{title}

{description}

{supportHint && (
{t('support_hint_label')}
)} {(actionLabel || children) && (
{actionHref && actionLabel && ( )} {onAction && actionLabel && ( )} {secondaryActionHref && secondaryActionLabel && ( )} {children}
)}
) } // Preset empty states for common pages export function EmptyInvoices() { const t = useTranslations('empty') return ( ) } export function EmptyCustomers({ onAction }: { onAction?: () => void } = {}) { const t = useTranslations('empty') return ( ) } export function EmptyTransactions() { const t = useTranslations('empty') return ( ) } export function EmptyReceipts() { const t = useTranslations('empty') return ( ) } export function EmptyDeadlines() { const t = useTranslations('empty') return ( ) } export function NoBankConnected() { const t = useTranslations('empty') return ( ) } export function EmptyReports() { const t = useTranslations('empty') return ( ) }