text: import {
    PURCHASE_CATEGORY_ALCOHOL,
    PURCHASE_CATEGORY_COMBINED_PASSENGER_TRANSPORT,
    PURCHASE_CATEGORY_ELECTRICITY,
    PURCHASE_CATEGORY_FINANCIAL_SERVICES,
    PURCHASE_CATEGORY_FOOD,
    PURCHASE_CATEGORY_FOOD_SERVING_SERVICES,
    PURCHASE_CATEGORY_HEALTHCARE_DOCTOR,
    PURCHASE_CATEGORY_INFORMATION_COMMUNICATION,
    PURCHASE_CATEGORY_INSURANCE,
    PURCHASE_CATEGORY_MAINTENANCE_DWELLING,
    PURCHASE_CATEGORY_MEDICINES_AND_HEALTH_PRODUCTS,
    PURCHASE_CATEGORY_MISC_DWELLING,
    PURCHASE_CATEGORY_MISC_SERVICES_PERSONAL_TRANSPORT,
    PURCHASE_CATEGORY_NON_DURABLE_HOUSEHOLD_GOODS,
    PURCHASE_CATEGORY_OTHER_PERSONAL_EFFECTS,
    PURCHASE_CATEGORY_OTHER_SERVICES,
    PURCHASE_CATEGORY_OTHER_TRANSPORT_SERVICES,
    PURCHASE_CATEGORY_READY_FOOD,
    PURCHASE_CATEGORY_RECREATIONAL_DURABLES,
    PURCHASE_CATEGORY_RECREATIONAL_SERVICES,
    PURCHASE_CATEGORY_RENTAL,
    PURCHASE_CATEGORY_SOCIAL_PROTECTION,
    PURCHASE_CATEGORY_STORE_BOOKS,
    PURCHASE_CATEGORY_STORE_CLOTHING,
    PURCHASE_CATEGORY_STORE_FOOD,
    PURCHASE_CATEGORY_STORE_FURNISHING,
    PURCHASE_CATEGORY_STORE_GARDEN_AND_PET,
    PURCHASE_CATEGORY_STORE_HARDWARE,
    PURCHASE_CATEGORY_STORE_PERSONAL_CARE,
    PURCHASE_CATEGORY_TRANSPORT_AIR,
    PURCHASE_CATEGORY_TRANSPORT_ROAD,
    PURCHASE_CATEGORY_TRANSPORTATION_AUTOMOTIVE_MAINTENANCE_AND_REPAIR,
    PURCHASE_CATEGORY_TRANSPORTATION_FUEL,
  } from '../../../definitions';
  import { getActivityTypeForPurchaseCategory } from '../../utils/activityTypeForPurchaseCategory';
  
  // Match NAG categories to our own categories
  const categoryToCategory = {
    'ATM & Checks': null,
    'Advisors & Services': PURCHASE_CATEGORY_OTHER_SERVICES,
    'Alimony & Child Support': PURCHASE_CATEGORY_SOCIAL_PROTECTION,
    'Auto & Transport': PURCHASE_CATEGORY_OTHER_SERVICES,
    'Auto Insurance & Assistance': PURCHASE_CATEGORY_INSURANCE,
    'Auto Loan etc.': null,
    Baby: PURCHASE_CATEGORY_OTHER_PERSONAL_EFFECTS,
    'Bank Fees': PURCHASE_CATEGORY_FINANCIAL_SERVICES,
    'Basic Expenses': PURCHASE_CATEGORY_FOOD,
    Betting: PURCHASE_CATEGORY_OTHER_SERVICES,
    'Building Insurance': PURCHASE_CATEGORY_INSURANCE,
    'Car Rental': PURCHASE_CATEGORY_TRANSPORT_ROAD,
    'Child Benefits': null,
    'Child Care & Tuition': null,
    'Child Savings': null,
    'Cinema, Concerts & Entertainment': PURCHASE_CATEGORY_RECREATIONAL_SERVICES,
    'Clothing & Accessories': PURCHASE_CATEGORY_STORE_CLOTHING,
    'Consumer Loan': null,
    'Contents Insurance': PURCHASE_CATEGORY_INSURANCE,
    'Debt & Interest': null,
    Education: null,
    'Electronics & Computer': PURCHASE_CATEGORY_INFORMATION_COMMUNICATION,
    Exclude: null,
    'Fast Food & Takeaway': PURCHASE_CATEGORY_FOOD_SERVING_SERVICES,
    Fines: null,
    'Flights & Hotels': PURCHASE_CATEGORY_TRANSPORT_AIR,
    'Food & Drinks': PURCHASE_CATEGORY_STORE_FOOD,
    Fuel: PURCHASE_CATEGORY_TRANSPORTATION_FUEL,
    'Furniture & Interior': PURCHASE_CATEGORY_STORE_FURNISHING,
    'Games & Toys': PURCHASE_CATEGORY_RECREATIONAL_DURABLES,
    'Garage & Auto Parts': PURCHASE_CATEGORY_TRANSPORTATION_AUTOMOTIVE_MAINTENANCE_AND_REPAIR,
    'Garden & Plants': PURCHASE_CATEGORY_STORE_GARDEN_AND_PET,
    'Gifts & Charity': null,
    'Glasses & Contacts': PURCHASE_CATEGORY_MEDICINES_AND_HEALTH_PRODUCTS,
    'Hairdresser & Personal Care': PURCHASE_CATEGORY_STORE_PERSONAL_CARE,
    'Health Insurance': PURCHASE_CATEGORY_INSURANCE,
    Hide: null,
    'Hobby & Sports Equipment': PURCHASE_CATEGORY_RECREATIONAL_DURABLES,
    'Holiday Pay': null,
    Home: PURCHASE_CATEGORY_NON_DURABLE_HOUSEHOLD_GOODS,
    'Home Security': PURCHASE_CATEGORY_MAINTENANCE_DWELLING,
    'Homeowners Association': PURCHASE_CATEGORY_MISC_DWELLING,
    Household: PURCHASE_CATEGORY_NON_DURABLE_HOUSEHOLD_GOODS,
    'Housekeeping & Gardening': PURCHASE_CATEGORY_STORE_HARDWARE,
    'Housing Benefit': null,
    Income: null,
    Interest: null,
    'Interest Income': null,
    'Late Fees': PURCHASE_CATEGORY_FINANCIAL_SERVICES,
    Leisure: PURCHASE_CATEGORY_RECREATIONAL_SERVICES,
    'Life & Accident Insurance': PURCHASE_CATEGORY_INSURANCE,
    'Meal Plan': PURCHASE_CATEGORY_STORE_FOOD,
    'Medical Specialists': PURCHASE_CATEGORY_HEALTHCARE_DOCTOR,
    Memberships: PURCHASE_CATEGORY_OTHER_SERVICES,
    'Mini-markets & Delicacies': PURCHASE_CATEGORY_READY_FOOD,
    'Mortgage/Rent': PURCHASE_CATEGORY_RENTAL,
    'Movies, Music & Books': PURCHASE_CATEGORY_STORE_BOOKS,
    'Online Services & Software': PURCHASE_CATEGORY_INFORMATION_COMMUNICATION,
    Other: null,
    'Other Housing Expenses': PURCHASE_CATEGORY_NON_DURABLE_HOUSEHOLD_GOODS,
    'Other Income': null,
    'Other Private Consumption': null,
    'Other Savings': null,
    'Other Transport': PURCHASE_CATEGORY_COMBINED_PASSENGER_TRANSPORT,
    'Overpaid Tax': null,
    Parking: PURCHASE_CATEGORY_MISC_SERVICES_PERSONAL_TRANSPORT,
    'Pension & Savings': null,
    'Pension Payout': null,
    'Pension Savings': null,
    Pets: PURCHASE_CATEGORY_STORE_GARDEN_AND_PET,
    Pharmacy: PURCHASE_CATEGORY_MEDICINES_AND_HEALTH_PRODUCTS,
    'Phone & Internet': PURCHASE_CATEGORY_INFORMATION_COMMUNICATION,
    'Private Loan (Friends & Family)': null,
    'Property Tax': null,
    'Public Transport': PURCHASE_CATEGORY_COMBINED_PASSENGER_TRANSPORT,
    'Public fee': null,
    'Remodeling & Repair': PURCHASE_CATEGORY_STORE_HARDWARE,
    'Road Tax & Green Tax': null,
    Salary: null,
    'Shared Expense': null,
    'Sports & Leisure': PURCHASE_CATEGORY_RECREATIONAL_SERVICES,
    'Stock Trading': null,
    'Student Grant': null,
    'Student Loan': null,
    Supermarket: PURCHASE_CATEGORY_STORE_FOOD,
    'TV license & Cable': PURCHASE_CATEGORY_INFORMATION_COMMUNICATION,
    Taxi: PURCHASE_CATEGORY_TRANSPORT_ROAD,
    'Tobacco & Alcohol': PURCHASE_CATEGORY_ALCOHOL,
    Transfer: null,
    Travel: PURCHASE_CATEGORY_OTHER_TRANSPORT_SERVICES,
    'Travel Insurance': PURCHASE_CATEGORY_INSURANCE,
    Tuition: PURCHASE_CATEGORY_OTHER_SERVICES,
    'Unemployment Benefits': null,
    'Union & Unemployment Insurance': PURCHASE_CATEGORY_INSURANCE,
    Unknown: null,
    'Unpayed Tax': null,
    Utilities: PURCHASE_CATEGORY_ELECTRICITY,
    'Vacation Activities': PURCHASE_CATEGORY_RECREATIONAL_SERVICES,
    'Vacation Home & Camping': PURCHASE_CATEGORY_RECREATIONAL_SERVICES,
    'Vacation Home Expenses': PURCHASE_CATEGORY_NON_DURABLE_HOUSEHOLD_GOODS,
    'Yield & Returns': null,
  };
  
  export const NAG_CATEGORY = Object.entries(categoryToCategory).reduce(
    (accumulator, [id, purchaseCategory]) => {
      accumulator[id] = purchaseCategory
        ? getActivityTypeForPurchaseCategory(purchaseCategory)
        : null;
      return accumulator;
    },
    {}
  );
  
  // Deliberately want activities that match the following
  // To be created with the ignored=true value
  export const CATEGORIES_TO_IGNORE = [
    'Child Benefits',
    'Holiday Pay',
    'Housing Benefit',
    'Overpaid Tax',
    'Pension & Savings',
    'Pension Payout',
    'Pension Savings',
    'Property Tax',
    'Public fee',
    'Salary',
    'Road Tax & Green Tax',
    'Salary',
    'Unemployment Benefits',
    'Unpayed Tax',
  ];
  