$component: $lib-name + "-menu";

.#{$component} {
  position: relative;
  background-color: #fff;
  .#{$component}-item-group {
    border-bottom: solid 1px #E8E8E8;
    .#{$component}-item-group-label {
      position: relative;
      .group-label-box {
        font-size: 14px;
        padding: 14px 24px;
        color: #252D39;
        transition: background $transition-time;
        cursor: pointer;
        &:hover {
          background-color: #EFF3FD;
          .ans-icon-arrow-up {
            opacity: 1;
          }
        }
        .group-label-box-text {
          display: inline-block;
          padding-right: 14px;
          text-overflow: ellipsis;
          overflow: hidden;
          white-space: nowrap;
          font-weight: bold;
        }
        .ans-icon-arrow-up {
          float: right;
          font-size: 14px;
          margin-top: 2px;
          color: $primary-color;
          opacity: 0;
          transition: all $transition-time;
        }
        .group-describe {
          font-size: 12px;
          color: #999;
          padding-top: 2px;
          height: 18px;
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
        }
      }
    }

    // 最后一行无下边框
    &:last-of-type {
      border-bottom: 0;
    }

    .#{$component}-item-group-box {
      padding-bottom: 16px;
    }

    // 收起状态
    &.is-group-close {
      .ans-icon-arrow-up {
        transform: rotate(180deg);
      }
      .#{$component}-item-group-box {
        display: none;
      }
    }
  }

  

  .#{$lib-name}-sub-menu {
    .sub-mune-box {
      .#{$component}-item {
        padding-left: 52px;
      }
    }
    .#{$lib-name}-sub-menu {
      .sub-mune-box {
        .#{$component}-item {
          padding-left: 76px;
        }
      }
      .#{$lib-name}-sub-menu {
        .sub-mune-box {
          .#{$component}-item {
            padding-left: 100px;
          }
        }
        .#{$lib-name}-sub-menu {
          .sub-mune-box {
            .#{$component}-item {
              padding-left: 124px;
            }
          }
        }
      }
    }
     // 收起状态
     &.is-sub-menu-close {
      .ans-icon-arrow-up {
        transform: rotate(180deg);
      }
    }
  }

  .#{$component}-item {
    padding: 0 26px;
    height: 32px;
    line-height: 32px;
    font-size: 12px;
    cursor: pointer;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    transition: all $transition-time;
    position: relative;
    a {
      color: inherit;
      text-decoration: none;
    }
    .router-link-a {
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
    }
    &:hover {
      background-color: $nav-color-hover;
    }
    &.is-active {
      color: $primary-color;
      .#{$component}-item-icon {
        color: $primary-color;
      }
    }
    .#{$component}-item-icon {
      color: $nav-icon-color;
      float: left;
      font-size: 14px;
      margin-right: 12px;
    }
    .#{$component}-item-right-icon {
      position: absolute;
      right: 10px;
      i {
        font-size: 12px;
        transition: all $transition-time;
      }
    }
  }


  &.is-collapsed {
    .#{$component}-item-group-label {
      display: none;
    }
    .#{$component}-item-group-box {
      padding: 8px 0;
    }
    .is-group-active {
      .ans-menu-item-group-box {
        display: inherit;
      }
    }
    .is-group-close {
      border-bottom: 0
    }
    .#{$lib-name}-sub-menu {
      .sub-mune-box {
        .#{$component}-item {
          padding: 0 !important;
        }
      }
    }
    .#{$component}-item {
      padding: 0;
      text-align: center;
      .#{$component}-item-icon {
        float: inherit;
        margin-right: 0;
      }
      .#{$component}-item-right-icon {
        display: none;
      }
      .#{$component}-item-label {
        display: none;
      }
    }
  }
}