'use client' import { Card, CardContent } from '@/components/ui/card' import { TrendingUp, TrendingDown, Info } from 'lucide-react' import { formatCurrency } from '@/lib/utils' import type { KPIReport } from '@/types' interface KPIOperationalGridProps { report: KPIReport } export function KPIOperationalGrid({ report }: KPIOperationalGridProps) { return (
{/* Revenue growth */}

Intäktstillväxt

{!report.periodComplete ? (

Välj ett avslutat räkenskapsår

) : report.revenueGrowth !== null ? (
{report.revenueGrowth >= 0 ? ( ) : ( )}

= 0 ? 'text-[hsl(var(--chart-1))]' : 'text-[hsl(var(--chart-2))]' }`}> {report.revenueGrowth > 0 ? '+' : ''}{report.revenueGrowth}%

) : (

Första räkenskapsåret

)}
{/* Expense ratio */}

Kostnadsandel

{report.expenseRatio !== null ? ( <>

{report.expenseRatio}%

) : (

Inga intäkter

)} {/* Avg payment days */}

Snittbetaltid

{report.avgPaymentDays === null && ( )}
{report.avgPaymentDays !== null ? (

{report.avgPaymentDays} dagar

) : (

Inte tillräckligt med data

)}
{/* VAT liability */}

Momsskuld

0 ? 'text-[hsl(var(--chart-2))]' : 'text-[hsl(var(--chart-1))]' }`}> {formatCurrency(Math.abs(report.vatLiability))}

{report.vatLiability > 0 ? 'Att betala' : report.vatLiability < 0 ? 'Att återfå' : 'Jämnt'}

) }