import '@/types/Constant/Usage';

export const SHOPEE_SPY_ENABLED = false;

export const SHOPEE_HEADER_KEYS = {
  IGNORE: 'af-ac-ignore',
  GET: 'af-ac-enc-dat',
};

export const SHOPEE_URLS = {
  PRODUCT_GET_PC: 'https://shopee.vn/api/v4/pdp/get_pc*',
  SEARCH_SEARCH_ITEMS: 'https://shopee.vn/api/v4/search/search_items*',
  CLIENT_GLOBAL: 'https://shopee.vn/api*',
  SELLER_ORDER_PRINT_JOB: 'https://banhang.shopee.vn/api/v3/logistics/get_sd_job*',
  SELLER_ORDER_PRINT_PDF: 'https://banhang.shopee.vn/api/v3/logistics/download_sd_job*',
  CHAT_WEBCHAT: 'https://banhang.shopee.vn/webchat/api/*/messages*',
};

export const SHOPEE_USAGE_TYPE = {
  productClone: 'productClone',
  downloadImage: 'downloadImage',
  downloadVideo: 'downloadVideo',
};

/** @type {ShopeeUsageLimits} */
export const SHOPEE_USAGE_LIMITS = {
  productClone: {
    Free: {
      dailyLimit: 20,
      waitFor: 60,
      totalMax: 200,
    },
    Vip: {
      dailyLimit: Infinity,
      waitFor: 0,
    },
    VipPlus: {
      dailyLimit: Infinity,
      waitFor: 0,
    },
  },
  downloadImage: {
    Free: {
      dailyLimit: 50,
      waitFor: 20,
    },
    Vip: {
      dailyLimit: Infinity,
      waitFor: 0,
    },
    VipPlus: {
      dailyLimit: Infinity,
      waitFor: 0,
    },
  },
  downloadVideo: {
    Free: {
      dailyLimit: 50,
      waitFor: 30,
    },
    Vip: {
      dailyLimit: Infinity,
      waitFor: 0,
    },
    VipPlus: {
      dailyLimit: Infinity,
      waitFor: 0,
    },
  },
};

/** @type {import('@type/Constant/Usage').ShopeeAutoRunLimits} */
export const SHOPEE_AUTO_RUN_LIMITS = {
  ratingOrder: {
    Vip: { runLimit: 10 },
    VipPlus: { runLimit: Infinity },
  },
  replyRating: {
    Vip: { runLimit: 10 },
    VipPlus: { runLimit: Infinity },
  },
  sendMessage: {
    Vip: { runLimit: 50 },
    VipPlus: { runLimit: Infinity },
  },
};
