import { Component, HostListener, Input, OnInit } from '@angular/core';
declare var jQuery: any;

export class PetyWidgetModel {
  percent: number;
  up?: boolean;
  down?: boolean;
  value: number;
  history: Array<number>;
}

@Component({
  selector: 'byte-summary-peti-widget',
  templateUrl: './summary-peti-widget.component.html',
  styleUrls: ['./summary-peti-widget.component.scss']
})
export class SummaryPetiWidgetComponent implements OnInit {

  @Input() options = {
    width: 200,
    height: 60,
    fill: "#dfecf9",
    stroke: "#024990",
    strokeWidth: 1
  };
  @Input() values = [1, 12, 3, 15, 5, -1, 10];
  @Input() header;
  @Input() value: PetyWidgetModel;

  constructor() { }

  ngOnInit() {
  }

  @HostListener('window:resize')
  public onResize() {
    jQuery('')
  }

}
