import 'package:krow_domain/krow_domain.dart';

// TODO: Implement FinancialRepositoryInterface once defined in a feature package.
class FinancialRepositoryMock {
  Future<List<Invoice>> getInvoices(String businessId) async {
    await Future.delayed(const Duration(milliseconds: 500));
    return <Invoice>[
      const Invoice(
        id: 'inv_1',
        eventId: 'event_1',
        businessId: 'biz_1',
        status: InvoiceStatus.paid,
        totalAmount: 1500.0,
        workAmount: 1400.0,
        addonsAmount: 100.0,
        invoiceNumber: 'INV-1',
        issueDate: null,
      ),
    ];
  }

  Future<List<StaffPayment>> getStaffPayments(String staffId) async {
    await Future.delayed(const Duration(milliseconds: 500));
    return <StaffPayment>[
      StaffPayment(
        id: 'pay_1',
        staffId: staffId,
        assignmentId: 'assign_1',
        amount: 120.0,
        status: PaymentStatus.paid,
        paidAt: DateTime.now().subtract(const Duration(days: 2)),
      ),
    ];
  }

  Future<List<InvoiceItem>> getInvoiceItems(String invoiceId) async {
    await Future.delayed(const Duration(milliseconds: 500));
    return <InvoiceItem>[
      const InvoiceItem(
        id: 'item_1',
        invoiceId: 'inv_1',
        staffId: 'staff_1',
        workHours: 8.0,
        rate: 25.0,
        amount: 200.0,
      ),
      const InvoiceItem(
        id: 'item_2',
        invoiceId: 'inv_1',
        staffId: 'staff_2',
        workHours: 6.0,
        rate: 30.0,
        amount: 180.0,
      ),
    ];
  }
}
