import { App } from 'vue'

const num = new URLSearchParams(window.location.search).get('m')
const options = {
  num: num || 'KJ-tjdiVSFOv8l',
  server: '/server-prod',
}

let __win = window as any
let __sdk = (__win.__sdk = new __win.KanKan(options))

export { __sdk }

export const installSDK = {
  install(app: App) {
    app.provide('__sdk', __sdk)
  },
}
