import { Component, OnInit, Input, ViewChild, ElementRef, AfterViewInit } from '@angular/core';

@Component({
  selector: 'neu-container',
  templateUrl: './neu-container.component.html',
  styleUrls: ['./neu-container.component.css']
})
export class NeuContainerComponent implements AfterViewInit {

  @Input() style:string;
  @Input() neu_pressed:string;
  @Input() neu_small:string;
  @ViewChild("neu_container") neu_container:ElementRef;

  constructor() { }

  ngAfterViewInit() {
    if(this.style!=null) {
      this.neu_container.nativeElement.setAttribute("style", this.style);
    }
    if(this.neu_pressed!=null) {
      this.neu_container.nativeElement.classList.add("neu-pressed");
    }
    if(this.neu_small!=null) {
      this.neu_container.nativeElement.classList.add("neu-small");
    }
  }

}
