export const TRACKING_TYPES = {
  QUANTITY: 'QUANTITY',
  WEIGHT: 'WEIGHT',
  VOLUME: 'VOLUME',
  SIZE: 'SIZE',
};

export const SIZE_SYSTEMS = {
  CLOTHING: 'CLOTHING',
  SHOES: 'SHOES',
};

export const UNITS = {
  QUANTITY: ['pcs', 'box', 'pack', 'pair', 'dozen'],
  WEIGHT: ['mg', 'g', 'kg'],
  VOLUME: ['ml', 'L'],
};

export const CLOTHING_SIZES = ['XS', 'S', 'M', 'L', 'XL', 'XXL', 'XXXL'];
export const SHOE_SIZES = ['5', '6', '7', '8', '9', '10', '11', '12'];

export const CATEGORY_DEFAULTS = {
  'Electronics': { trackingType: TRACKING_TYPES.QUANTITY, unit: 'pcs', sizeSystem: null },
  'Groceries': { trackingType: TRACKING_TYPES.WEIGHT, unit: 'kg', sizeSystem: null },
  'Stationery': { trackingType: TRACKING_TYPES.QUANTITY, unit: 'pcs', sizeSystem: null },
  'Clothing': { trackingType: TRACKING_TYPES.SIZE, unit: null, sizeSystem: SIZE_SYSTEMS.CLOTHING },
  'Home & Kitchen': { trackingType: TRACKING_TYPES.QUANTITY, unit: 'pcs', sizeSystem: null },
  'Sports': { trackingType: TRACKING_TYPES.QUANTITY, unit: 'pcs', sizeSystem: null },
  'Beauty': { trackingType: TRACKING_TYPES.QUANTITY, unit: 'pcs', sizeSystem: null },
  'Other': { trackingType: TRACKING_TYPES.QUANTITY, unit: 'pcs', sizeSystem: null },
};

export const ALLOWED_TRACKING_TYPES_BY_CATEGORY = {
  'Electronics': [TRACKING_TYPES.QUANTITY],
  'Groceries': [TRACKING_TYPES.WEIGHT, TRACKING_TYPES.VOLUME, TRACKING_TYPES.QUANTITY],
  'Stationery': [TRACKING_TYPES.QUANTITY],
  'Clothing': [TRACKING_TYPES.SIZE, TRACKING_TYPES.QUANTITY],
  'Home & Kitchen': [TRACKING_TYPES.QUANTITY, TRACKING_TYPES.WEIGHT, TRACKING_TYPES.VOLUME],
  'Sports': [TRACKING_TYPES.QUANTITY, TRACKING_TYPES.SIZE],
  'Beauty': [TRACKING_TYPES.QUANTITY, TRACKING_TYPES.VOLUME],
  'Other': [TRACKING_TYPES.QUANTITY, TRACKING_TYPES.WEIGHT, TRACKING_TYPES.VOLUME, TRACKING_TYPES.SIZE],
};

export const TRACKING_TYPE_LABELS = {
  [TRACKING_TYPES.QUANTITY]: 'Quantity',
  [TRACKING_TYPES.WEIGHT]: 'Weight',
  [TRACKING_TYPES.VOLUME]: 'Volume',
  [TRACKING_TYPES.SIZE]: 'Size',
};

export const SIZE_SYSTEM_LABELS = {
  [SIZE_SYSTEMS.CLOTHING]: 'Clothing Sizes',
  [SIZE_SYSTEMS.SHOES]: 'Shoe Sizes',
};

export const UNIT_LABELS = {
  pcs: 'Pieces',
  box: 'Box',
  pack: 'Pack',
  pair: 'Pair',
  dozen: 'Dozen',
  mg: 'Milligrams',
  g: 'Grams',
  kg: 'Kilograms',
  ml: 'Milliliters',
  L: 'Liters',
};
