import { type PillsProps } from '@material-hu/components/design-system/Pills/types';

import { type FinishedLoanStatus } from './types';

export const FINISHED_LOAN_STATUS_PILL_TYPE: Record<
  FinishedLoanStatus,
  PillsProps['type']
> = {
  PAID: 'success',
  CANCELLED: 'neutral',
};

export const FINISHED_LOAN_STATUS_LABEL_KEYS: Record<
  FinishedLoanStatus,
  string
> = {
  PAID: 'history.status_paid',
  CANCELLED: 'history.status_cancelled',
};

export const PLAN_OPTIONS = [
  { weeks: 4, totalMultiplier: 1.0812210526 },
  { weeks: 8, totalMultiplier: 1.1492210526 },
  { weeks: 12, totalMultiplier: 1.2198947368 },
] as const;

export const PLAN_INTEREST_RATIO = 0.862;
export const PLAN_TAX_RATIO = 0.138;

export const LOAN_REASON_OTHER = 'other';

export const MICROLOANS_ADVANCE_REASON_OPTIONS = [
  { id: 'health', labelKey: 'confirm.reason_health' as const },
  { id: 'rent', labelKey: 'confirm.reason_rent' as const },
  { id: 'groceries', labelKey: 'confirm.reason_groceries' as const },
  { id: 'school', labelKey: 'confirm.reason_school' as const },
  { id: 'transport', labelKey: 'confirm.reason_transport' as const },
  { id: 'debt', labelKey: 'confirm.reason_debt' as const },
  { id: 'emergency', labelKey: 'confirm.reason_emergency' as const },
  { id: 'personal', labelKey: 'confirm.reason_personal' as const },
  { id: LOAN_REASON_OTHER, labelKey: 'confirm.reason_other' as const },
] as const;
