import { SITES } from './../../../../../core/mocks/data';
import { Site } from 'src/app/core/interfaces/site/site';
import { environment } from './../../../../../../environments/environment';
import { QueryService } from './../../../../../core/services/query/query.service';
import { Component, Input, OnInit, EventEmitter, Output } from '@angular/core';
import { faBorderAll } from '@fortawesome/free-solid-svg-icons';
@Component({
  selector: 'app-sites',
  templateUrl: './sites.component.html',
  styleUrls: ['./sites.component.scss']
})
export class SitesComponent implements OnInit {


  @Output() emitAllyId = new EventEmitter();
  @Input() is_slide_mode: boolean = true;

  icon_border_all = faBorderAll;
  url = environment.BASE_URL_API;
  sites: Site[] = SITES;

  constructor(private queryService: QueryService) { }

  ngOnInit() {
    this.queryService.query(`${this.url}/allys/`, 'GET')?.subscribe(
      (data) => {
        console.log("This is data",data)
      },
      (error) => {
        console.log(error)
      }
    )
  }

  changeModeList(){
    this.is_slide_mode=true;
  }

  changeModeSlide(){
    this.is_slide_mode=false;
  }

  handlePatternAllyId($event: any) {
    this.emitAllyId.emit($event);
  }

}
