import { Component, OnInit } from '@angular/core';
import {LoanSingleService} from '../service/loan.single.service';
import {ActivatedRoute, Router} from '@angular/router';
import {AuthService} from '../service/auth.service';
import { TileLayoutGap } from '@progress/kendo-angular-layout';

@Component({
  selector: 'app-loan-steps',
  templateUrl: './loan-steps.component.html',
  styleUrls: ['./loan-steps.component.scss']
})
export class LoanStepsComponent implements OnInit {
  public LoanId: string;

  public steps = [
    { label: "Step One" },
    { label: "Step Two" },
    { label: "Step Three", optional: true },
    { label: "Step Four" },
    { label: "Step Five" },
  ];

  public gap: TileLayoutGap = {
    rows: 25,
    columns: 40
  };

  public firstTileContent = `Reactive Netscape cherry pick domain contribution lazy Edge program.`;
  public secondTileContent = `Lazy reflog freelancer Dijkstra directed acyclic graph concurrent uglify concurrency Safari.`;
  public thirdTileContent = `Senior-engineer Edge backend UI subclass tech debt duck typing merge sort lazy.`;
  public fourthTileContent = `Infrastructure tl;dr spy data store remote procedure call bootcamp pairing child keycaps.`;

  constructor(private lss: LoanSingleService, private actRoute: ActivatedRoute, private auth: AuthService, private router: Router) { }

  ngOnInit(): void {
    const LoanId  = this.actRoute.snapshot.params.id;

    setTimeout(() => {
      this.steps = this.stepsKeys(50);
    }, 2000);
  }


  private stepsKeys(num: number):  {label: string}[] {
    let ret = [];
    for (let i=1; i<=num; i++){
      ret.push( {label: i, optional: false});
    }
    return ret;
  }
}
