import { Component, ViewChild } from '@angular/core';
import { NgbOffcanvas } from '@ng-bootstrap/ng-bootstrap';

@Component({
  selector: 'app-offcanvas',
  templateUrl: './offcanvas.component.html',
  styleUrls: ['./offcanvas.component.scss'],
})
export class OffcanvasComponent {
  constructor(private offcanvasService: NgbOffcanvas) {}
  closeResult = '';
  @ViewChild('content') content?: NgbOffcanvas;

  public openNavigation(): void {
    this.open(this.content);
  }

  public open(content: any) {
    this.offcanvasService.open(content, { backdropClass: 'invisibleBackdrop' });
  }
}
