import { Category } from "./category"
import { Transaction } from "./transaction"

export interface DashboardData {
    totalExpense: number,
    totalIncome: number,
    balance: number,
    categories: DashboardCategory[],
    upcomingTransactions: Transaction[],
    recentTransactions: Transaction[],
    weeks: DashboardWeek[],
    analyzedText?: AISummary,
}

export interface AISummary {
    common: string,
    categoryAnalysis: string,
    keyInsights: string,
    recommendations: string
}

export interface DashboardWeek {
    startDate: Date,
    endDate: Date,
    expenseSum: number,
    categories: WeekCategory[],
}

export interface WeekCategory {
    categoryId: number,
    categoryName: string,
    categoryIcon: string
    sum: number,
}

export interface DashboardCategory {
    category: Category,
    currentPeriodAmount: number,
    previousPeriodAmount: number,
    changeDiff: number,
    changeDiffPercentage: number,
}

