@import '../jnt-variables';
@import '../elements/icon';
@import '../jnt-hosts';
@import '../jnt-functions';
$app-header-height: 70px !default;
$app-footer-height: 50px !default;
$app-aside-width: 200px !default;
$app-aside-burger-width: 40px !default;
$app-aside-burger-height: 40px !default;
$app-aside-collapsed-width: 55px !default;
$lp-header-height: 150px !default;
$lp-header-height-mobile: 100px !default;

@mixin jnt-breadcrumbs($passed: (), $context: null, $strategy: 'changes') {
  $defs: (
    padding: 0 0 0 $jnt-gutter-normal,
    margin: $jnt-gutter-small 0 $jnt-gutter-small 0
  );
  $vars: $passed;
  $declare: false;
  $wrapper: null;
  @if $jnt-ng-deep {
    $wrapper: '::ng-deep';
  }
  @if $passed == () or $strategy == 'merge' {
    $vars: recursive-map-merge($defs, $passed);
    $declare: true;
  }
  #{if($context, $context, $jnt-breadcrumbs-host)} {
    @if $declare {
      display: flex;
      align-items: center;
    }
    padding: map-get($vars, padding);
    margin: map-get($vars, margin);
    @include for-mobile() {
      &[data-with-aside='true'] {
        @if $declare {
          min-height: $app-aside-burger-height;
          margin-top: 0;
          padding-left: calc(#{$app-aside-burger-width} + #{$jnt-gutter-normal});
        }
      }
    }
  }
  #{$context} #{$wrapper} a[child-of=jnt-breadcrumbs-host] {
    @if $declare {
      color: $jnt-primary-text-light-color;
      font-size: 12px;
      text-decoration: none;
      user-select: none;
      white-space: nowrap;
      &:hover {
        color: $jnt-primary-color;
      }
      &[data-disabled='true'] {
        opacity: .5;
        pointer-events: none;
        cursor: default;
      }
      &:last-of-type {
        color: $jnt-primary-text-dark-color;
        pointer-events: none;
        cursor: default;
      }
    }
  }
  #{$context} #{$wrapper} [data-icon][child-of=jnt-breadcrumbs-host] {
    @if $declare {
      @include jnt-icon((
        color: $jnt-primary-text-light-color,
        size: 8px
      ), '&');
      &:last-child {
        display: none;
      }
    }
  }
}
@if $jnt-debug {
  @debug 'breadcrumbs compiled';
}
