export { default as ExpenseStatusBadge } from './ExpenseStatusBadge.vue'
export { default as ExpenseSearchForm } from './ExpenseSearchForm.vue'
export { default as ExpenseForm } from './ExpenseForm.vue'

// Expense Status Constants theo API documentation
export const ExpenseStatus = {
  Pending: 0,    // Chờ duyệt
  Approved: 1,   // Đã duyệt
  Rejected: 2,   // Đã từ chối
  Paid: 3        // Đã chuyển tiền
}

// Utility functions theo API documentation
export const getExpenseStatusText = (status) => {
  switch (status) {
    case ExpenseStatus.Pending:
      return 'Chờ duyệt'
    case ExpenseStatus.Approved:
      return 'Đã duyệt'
    case ExpenseStatus.Rejected:
      return 'Đã từ chối'
    case ExpenseStatus.Paid:
      return 'Đã chuyển tiền'
    default:
      return 'Không xác định'
  }
}

export const getExpenseStatusClass = (status) => {
  const baseClass = 'badge'
  switch (status) {
    case ExpenseStatus.Pending:
      return `${baseClass} bg-warning text-dark`
    case ExpenseStatus.Approved:
      return `${baseClass} bg-success`
    case ExpenseStatus.Rejected:
      return `${baseClass} bg-danger`
    case ExpenseStatus.Paid:
      return `${baseClass} bg-primary`
    default:
      return `${baseClass} bg-secondary`
  }
}
