import { SdkDefault } from "./SdkDefault";

export class SdkIOS extends SdkDefault {
    private className = "com/utils/Sdk";
    share(imageBase64: any, text: string) {
        //jsb.reflection.callStaticMethod(this.className, "share", "(Ljava/lang/String;Ljava/lang/String;)V", imageBase64, text);
    }

    /////////////////////////////////////////////////////Purchase
    getProducts(cb?: (catalog: Array<any>) => void) {

    }
    getPurchases(cb?: (result: boolean, purchases?: any) => void) {
    }
    purchaseProduct(sku: string, cb?: (result: boolean, purchases?: any) => void) {
        cb && cb(true, { purchaseToken: sku })
    }
    consumePurchase(token: string, cb?: (result: boolean) => void) {
        cb && cb(true);
    }
    isPaymentReady(cb?: (result: boolean) => void) {
        cb && cb(true);
    }


    //Ads
    showInterAd() {
        cc.log('show InterAd');
    }

    showVideoAd(cb?: (result: boolean) => void) {
        cc.log('show VideoAd');
        cb && cb(true);
    }

    vibrate(milliSeconds: number) {

    }

    isVibrateSupport(): boolean {
        return false;
    }

    rate() {

    }
}
