import {useJavaStatic,useJava} from './index'
class Toast{
    static LENGTH_SHORT=0;
    static LENGTH_LONG=1;
    static classFullName="android.widget.Toast";
    #intName:string="";

    constructor(intName:string){
        this.#intName=intName
    }
    static async makeText(ctx:string,msg:string,duration:number){
        let retName=await useJavaStatic(Toast.classFullName,'makeText',[ctx,msg,duration]);
        return new Toast(retName);
    }
    show(){
        useJava(this.#intName,"show",[]);
    }
}

export default Toast;