import { Injectable } from '@angular/core';

import { ToastController } from '@ionic/angular';

@Injectable({
  providedIn: 'root'
})
export class UIService {

  constructor(public toastController: ToastController) { }

  presentToast = async (message, duration = 2000) => {
    const toast = await this.toastController.create({
      message: message,
      duration: duration   
    })

    toast.present();
    return toast;
  }

}
