import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { apiUrl } from 'src/app/_providers/_resources/api-url.properties';
import { MasterService } from 'src/app/_providers/_services/master.service';

@Component({
  selector: 'app-website',
  templateUrl: './website.component.html',
  styleUrls: ['./website.component.scss']
})
export class WebsiteComponent implements OnInit {
  
  marqueeText: any = '';

  constructor(
    private router:Router,
    private _masterService : MasterService
  ) { }

  ngOnInit(): void {
    this.getMarqueeData();
  }


  openTender(){
    this.router.navigate(['/auth/admin-home'])
  }

  getMarqueeData(){
    this._masterService.getMasterData(apiUrl.common).then(res=>{
      if(res && res.length > 0 && res[0].marquee && res[0].marquee != '' ){
        this.marqueeText = res[0].marquee
      }
    })
  }
}
