import {
  PAYMENT_METHOD_OPTIONS, EXPENSE_STATUS_OPTIONS, MEMBER_STATUS_OPTIONS,
  GENDER_OPTIONS, LANGUAGE_OPTIONS, ROLE_OPTIONS,
} from './option-lists';

describe('option-lists', () => {
  it('payment methods preserve raw values and show bilingual labels', () => {
    expect(PAYMENT_METHOD_OPTIONS.map(o => o.value))
      .toEqual(['Cash', 'Check', 'Zelle', 'PayPal', 'Other']);
    expect(PAYMENT_METHOD_OPTIONS.find(o => o.value === 'Cash')!.label).toBe('Cash/現金');
    expect(PAYMENT_METHOD_OPTIONS.find(o => o.value === 'Zelle')!.label).toBe('Zelle');
  });

  it('expense statuses preserve raw enum values', () => {
    expect(EXPENSE_STATUS_OPTIONS.map(o => o.value))
      .toEqual(['Draft', 'PendingApproval', 'Approved', 'Paid', 'Rejected']);
  });

  it('member statuses preserve raw values', () => {
    expect(MEMBER_STATUS_OPTIONS.map(o => o.value))
      .toEqual(['Member', 'Visitor', 'Inactive', 'Former']);
  });

  it('gender values stay M/F/Other', () => {
    expect(GENDER_OPTIONS.map(o => o.value)).toEqual(['M', 'F', 'Other']);
  });

  it('language values stay en/zh-TW', () => {
    expect(LANGUAGE_OPTIONS.map(o => o.value)).toEqual(['en', 'zh-TW']);
  });

  it('role options cover all 13 role codes', () => {
    expect(ROLE_OPTIONS.length).toBe(13);
    expect(ROLE_OPTIONS.map(o => o.value)).toContain('super_admin');
    expect(ROLE_OPTIONS.map(o => o.value)).toContain('visitor');
  });
});
