import { Component, OnInit } from '@angular/core';
import { ToastrService } from 'ngx-toastr';

@Component({
  selector: 'app-components-test',
  templateUrl: './components-test.component.html',
  styleUrls: ['./components-test.component.css']
})
export class ComponentsTestComponent implements OnInit {

  dropdown_val:number = 1;
  radio_val:number = 2;
  checkbox_val:boolean = false;
  inputtext_val:string = "hola";
  inputnum_val:number;
  inputemail_val:string;
  inputpassword_val:string;
  inputtime_val:string;
  inputdate_val:Date;
  inputdatetime_val:Date;
  textarea_val:string;
  page:number = 0;
  multi_toggle_value:any[] = [1,2];

  countries:any[] = [
    {
      name: 'Russia',
      flag: 'f/f3/Flag_of_Russia.svg',
      area: 17075200,
      population: 1469897543453453534534543
    },
    {
      name: 'Canada',
      flag: 'c/cf/Flag_of_Canada.svg',
      area: 9976140,
      population: 36624199
    },
    {
      name: 'United States',
      flag: 'a/a4/Flag_of_the_United_States.svg',
      area: 9629091,
      population: 324459463
    },
    {
      name: 'China',
      flag: 'f/fa/Flag_of_the_People%27s_Republic_of_China.svg',
      area: 9596960,
      population: 1409517397
    }
  ];

  autocomplete_val = this.countries[0];

  constructor(private toastr:ToastrService) { }

  ngOnInit() {
  }

  showToast() {
    this.toastr.info("Notificació de prova", "Descripció de prova", {
      progressBar: true
    });
  }

  autocompleteInputChanged(event:string) {

  }

}
