/*
 * Copyright (C) 2018 Robert Bosch GmbH Copyright (C) 2018 Robert Bosch Manufacturing Solutions GmbH, Germany. All rights reserved.
 */

import { Component, ContentChild, Input } from '@angular/core';
import { RouterOutlet } from '@angular/router';

/**
 * The detail part of the {@link MasterDetailViewComponent}
 */
@Component({
  selector: 'bci-detail-view',
  templateUrl: './detail-view.component.html',
  styleUrls: ['./detail-view.component.scss'],
})
export class DetailViewComponent {
  // TODO: find a solution so that <bci-page-content> can be used in demo/solution instead of isPadded and still the sidebar is working
  @Input() public isPadded = true;

  @ContentChild(RouterOutlet) private _routerOutlet!: RouterOutlet;

  public get hasRouterOutlet(): boolean {
    return !!this._routerOutlet;
  }
}
