import { validShopeeApiClient } from './client/shop';
import { validShopeeApiSeller } from './seller/init';
import { openExternalUrl } from '@/browser/tab';
import { SHOPEE_DOMAIN_SELLER } from '@/config/api';

export const validateShopeeApiAuthed = async () => {
  const validAll = (await Promise.all([validShopeeApiClient(), validShopeeApiSeller()])).every((active) => active);

  return validAll;
};

export const openSellerHome = async () => openExternalUrl(SHOPEE_DOMAIN_SELLER, false);
