import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';

import { LightboxPage } from '../lightbox/lightbox';

@Component({
  selector: 'page-chat',
  templateUrl: 'chat.html'
})

export class ChatPage {

  profile: any;
  tabNavEl: any;

  constructor(public navCtrl: NavController, private _params: NavParams) {
    this.profile = this._params.get('profile');
    this.tabNavEl = document.querySelector('#tab-nav .tabbar');
  }

  ionViewWillEnter() {
    this.tabNavEl.style.display = 'none';
  }

  closeChat(event) {
    this.navCtrl.pop();
  }

  showLightbox(event, image) {
    this.navCtrl.push(LightboxPage, {
      image: image
    });
  }
}
