import * as AgoraMiniappSDK from 'src/libs/Agora_SDK_for_WeChat';
import { AGORA_APP_SDK } from "any-hooks/communication/token";
import { AgoraAppStore } from 'any-hooks/types/agora';

const appid   = '0a67966ff4ae4eb3b32446df0151e16a';
const client  = new AgoraMiniappSDK.Client();
const log     = AgoraMiniappSDK.LOG;

export function useAgoraSDK(): AgoraAppStore {
  return { appid, client, sdk: AgoraMiniappSDK, log, platform: 'mini-app' }
}

useAgoraSDK.token = AGORA_APP_SDK;