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

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

    constructor(public toastController: ToastController) { }


    async presentToastWithOptions(message: string, color?: string) {
        const toast = await this.toastController.create({
            message: message,
            position: 'bottom',
            mode: 'ios',
            duration: 3000,
            color: color ? color : 'dark',
        });

        toast.present();
    }
}
