export interface looseObject {
  [key: string]: any;
}

export type CustomerSavingsSummary = {
  customerId: string;
  totalAmountInSavingsAccount: number;
  totalWithdrawnAmount: number;
  totalInterestPaidOut: number;
  totalPendingInterest: number;
};

export type FundSavingsParams = {
  savingsId: string;
  amount: number; // Amount in kobo
};

export type CreateSavingsParams = {
  planId?: number;
  accountName: string;
  savingTarget: number;
  periodicSavingsAmount?: number;
  frequency?: number;
  savingsCategoryId: number;
  deductionType?: number;
  percentageDeduction?: number;
  flatRateDeduction?: number;
  deductionFrequency?: number;
  deductionMethod?: number;
  narration: string;
  startDate?: string; // ISO string format
  endDate?: string; // ISO string format
  autoSave: boolean;
  isInterestDisabled: boolean;
  savingsPlanColor?: string;
};

export type UpdateSavingsParams = {
  savingsId: string; // Required to identify which savings account to update
  planId?: number;
  accountName: string;
  savingTarget: number;
  periodicSavingsAmount?: number;
  frequency?: number;
  savingsCategoryId: number;
  deductionType?: number;
  percentageDeduction?: number;
  flatRateDeduction?: number;
  deductionFrequency?: number;
  deductionMethod?: number;
  narration: string;
  startDate?: string; // ISO string format
  endDate?: string; // ISO string format
  autoSave: boolean;
  isInterestDisabled: boolean;
  savingsPlanColor?: string;
};

export type WalletTransactionDto = {
  transactionId: string;
  amount: number;
  description: string;
  createdDate: string;
  transactionType: string;
  narration: string;
};

export type TransactionListResponse = {
  nextPageToken?: string;
  transactionsList: WalletTransactionDto[];
};
