import {
  Component, ElementRef, Input,
} from '@angular/core';
import { BlockableUI } from 'primeng/primeng';

@Component({
  selector: 'of-p-div',
  template: `
    <div [ngStyle]="style" [class]="styleClass">
      <ng-content></ng-content>
    </div>
  `,
})
export class DivComponent implements BlockableUI {
  @Input() style: any;

  @Input() styleClass: string;

  constructor(private el: ElementRef) { }

  getBlockableElement(): HTMLElement {
    return this.el.nativeElement.children[0];
  }
}
