import { Component, OnInit, ViewChild } from '@angular/core';
import { FooterModalComponent } from '../home/footer-modal/footer-modal/footer-modal.component';

@Component({
  selector: 'app-home-privada',
  templateUrl: './home-privada.component.html',
  styleUrls: ['./home-privada.component.css']
})
export class HomePrivadaComponent implements OnInit {
  @ViewChild('modal') modal!: FooterModalComponent;

  email: string = '';

  constructor() { }

  ngOnInit() { 
    const userId = localStorage.getItem('UserId');
    console.log(userId)
  }

  public get homePrivadaId(){
    return localStorage.getItem('id');
  }

  showModal() {
    if (this.email === "") return;

    this.modal.toggle();
    this.email = "";
  }
}

