import { Component, OnInit } from '@angular/core';

interface Country {
  id?: number;
  equip: string;
  name: string;
  sdate: string;
  edate: string;
}

const COUNTRIES: Country[] = [
  {
    equip: 'string',
    name: 'ray',
    sdate: 'string',
    edate: 'string'
  }

];


@Component({
  selector: 'app-admin-pending',
  templateUrl: './admin-pending.component.html',
  styleUrls: ['./admin-pending.component.scss']
})
export class AdminPendingComponent implements OnInit {
  page = 1;
  pageSize = 10;
  collectionSize = COUNTRIES.length;
  countries: Country[];

  constructor() {
    this.refreshCountries();
  }

  refreshCountries() {
    this.countries = COUNTRIES
      .map((country, i) => ({ id: i + 1, ...country }))
      .slice((this.page - 1) * this.pageSize, (this.page - 1) * this.pageSize + this.pageSize);
  }

  ngOnInit(): void {
  }

}
