import { Injectable } from '@angular/core';
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
import { AnimationController, ModalController, NavParams, PopoverController } from '@ionic/angular';
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
import { CreateProcessPage } from '../modals/create-process/create-process.page';


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

  constructor(
    private modalController: ModalController,
  ) { }

  BookMeetingModalPage(e:BookMeetingModalPagecomponentProps, { cssClass='', backdropDismiss = false }) {
    return this.modalController.create({
      component: BookMeetingModalPage,
      componentProps: {
        task: e.task,
      },
      cssClass,
      backdropDismiss
    });
  }

  ExpedientTaskModalPage(e:ExpedientTaskModalPageComponentProps, { cssClass ="", backdropDismiss = false }) {
    
    return this.modalController.create({
      component: ExpedientTaskModalPage,
      componentProps: {
        taskAction: e.taskAction,
        task: e.task,
        profile: e.profile,
      },
      cssClass,
    });

  }

  CreateProcessPage(e:CreateProcessPageComponentProps, { cssClass ="", backdropDismiss = false }) {
    return this.modalController.create({
      component: CreateProcessPage,
      componentProps: {
        taskAction: e.taskAction,
        task: e.fulltask,
        fulltask: e.fulltask
      },
      cssClass,
    });
  }

  
}
