import { getLazadaSellerInfo } from '@/api/lazada/seller/get';
import { LazadaShopIdentify } from '@background/store/shop';

export const lazadaShopIdentify = async () => {
  const shopInfo = await getLazadaSellerInfo();

  if (!shopInfo || !shopInfo.shopId || !shopInfo.shopName) {
    return null;
  }

  LazadaShopIdentify.setShopId(shopInfo.shopId);
  LazadaShopIdentify.setShopName(shopInfo.shopName);

  return shopInfo;
};
