import {
    Banknote,
    FileImage,
    FileSignature,
    FileText,
    ReceiptText,
} from 'lucide-react';
import type { LucideIcon } from 'lucide-react';

type DocumentTypeAppearance = {
    icon: LucideIcon;
    iconContainerClassName: string;
};

export function getDocumentTypeAppearance(typeKey: string): DocumentTypeAppearance {
    switch (typeKey) {
        case 'invoice':
        case 'invoice_incoming':
        case 'invoice_outgoing':
            return {
                icon: ReceiptText,
                iconContainerClassName: 'bg-primary-soft text-primary-soft-foreground',
            };
        case 'fiscal_receipt':
        case 'receipt':
            return {
                icon: ReceiptText,
                iconContainerClassName: 'bg-warning-soft text-warning-soft-foreground',
            };
        case 'bank_statement':
            return {
                icon: Banknote,
                iconContainerClassName: 'bg-secondary-soft text-secondary-soft-foreground',
            };
        case 'contract':
            return {
                icon: FileSignature,
                iconContainerClassName: 'bg-success-soft text-success-soft-foreground',
            };
        case 'image':
            return {
                icon: FileImage,
                iconContainerClassName: 'bg-secondary-soft text-secondary-soft-foreground',
            };
        default:
            return {
                icon: FileText,
                iconContainerClassName: 'bg-muted text-muted-foreground',
            };
    }
}
