import type { MediaItem } from '@/types/media';
import type { Paginated } from '@/types/common';

export type CashAccount = {
    id: number;
    name: string;
    balance: number;
    balance_formatted: string;
};

export type CashTransactionListItem = {
    id: number;
    type: 'deposit' | 'withdrawal';
    reference_type: string | null;
    reference_label: string;
    is_incoming: boolean;
    source_badge_class: string;
    amount: number;
    amount_formatted: string;
    balance_after: number;
    balance_after_formatted: string;
    description: string;
    created_at_formatted: string;
    created_by_name: string;
    photos?: MediaItem[];
};

export type CashTransactionFormData = {
    amount: string;
    description: string;
    photos: File[];
    remove_media_ids: number[];
};

export type PaginatedCashTransactions = Paginated<CashTransactionListItem>;
