import { Component, OnInit } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { DiscotecaI } from '../interfaces/discoteca-i';
import { Eventoi } from '../interfaces/eventoi';
import { Reservai } from '../interfaces/reservai';
import { ReservamodalPage } from '../reservamodal/reservamodal.page';
import { FeedService } from '../services/feed.service';

@Component({
  selector: 'app-view-evento-cliente',
  templateUrl: './view-evento-cliente.page.html',
  styleUrls: ['./view-evento-cliente.page.scss'],
})
export class ViewEventoClientePage implements OnInit {

  evento: Eventoi;
  discoteca: DiscotecaI;
  reserva: Reservai;
  constructor(private feedService: FeedService, private modalController: ModalController) { }

  ngOnInit() {
    this.evento = this.feedService.getEventoByIndex(this.feedService.eventoIndex);
    this.discoteca = this.feedService.discotecaEvento;
  }

  openReserva(){
    this.modalController.create({
      component: ReservamodalPage,

    }).then(modal => modal.present());

  }

}
