import { Node } from "cc"; export interface IGoogleLoginRes { accessToken: string; isCancel: boolean; status?: string; reason?: string; } export interface IGoogleBtnLogin { active: boolean, setActive: (active: boolean) => void, clear: () => void, } export abstract class GoogleImpl { private _isInitialized = false; public get isInitialized() { return this._isInitialized; } abstract init(); protected onInited() { this._isInitialized = true; } async login(): Promise { const res = await this.onLogin(); return res; } protected abstract onLogin(): Promise; abstract logOut(): Promise; createLoginBtn(node: Node, callback: (res: IGoogleLoginRes) => void): IGoogleBtnLogin { return null; } }