export const TRACKING_TYPES = ['QUANTITY', 'WEIGHT', 'VOLUME', 'SIZE'];

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

export const SIZE_SYSTEMS = {
  CLOTHING: ['XS', 'S', 'M', 'L', 'XL', 'XXL', 'XXXL'],
  SHOES: ['5', '6', '7', '8', '9', '10', '11', '12'],
};

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

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

export const ALLOWED_IMAGE_TYPES = ['image/jpeg', 'image/jpg', 'image/png', 'image/webp'];
export const MAX_IMAGE_SIZE = 5 * 1024 * 1024;
export const IMAGE_UPLOAD_DIR = 'uploads/products';
export const THUMBNAIL_DIR = 'uploads/products/thumbnails';
