import { Component, OnInit, ChangeDetectionStrategy, Input } from '@angular/core';
import { NbPositionedContainerComponent, NbRenderableContainer, NbPosition } from '@nebular/theme';

@Component({
  selector: 'ngx-popover-msg',
  templateUrl: './popover-msg.component.html',
  styleUrls: ['./popover-msg.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class PopoverMsgComponent extends NbPositionedContainerComponent implements NbRenderableContainer {
  renderContent() {
    //throw new Error("Method not implemented.");
  }

  @Input() message: string

  @Input()
  context: { message?: string, position: NbPosition } = {
    position: NbPosition.BOTTOM_END
  };
  ngOnInit() {
    this.message = this.context.message;
    this.position = this.context.position || NbPosition.BOTTOM_END;
  }

}
