//
// Copyright IBM Corp. 2016, 2018
//
// This source code is licensed under the Apache-2.0 license found in the
// LICENSE file in the root directory of this source tree.
//

//-----------------------------
// ComboBox
//-----------------------------

@import '../../globals/scss/vars';
@import '../../globals/scss/functions';
@import '../../globals/scss/vendor/@carbon/elements/scss/import-once/import-once';
@import '../list-box/list-box';

@mixin combo-box {
  .#{$prefix}--combo-box > .#{$prefix}--list-box__field {
    padding: 0;
  }
}

@mixin combo-box--x {
  .#{$prefix}--combo-box > .#{$prefix}--list-box__field[disabled] > .#{$prefix}--list-box__menu-icon,
  .#{$prefix}--combo-box > .#{$prefix}--list-box__field[disabled] > .#{$prefix}--list-box__menu-icon--open {
    display: none;
  }

  .#{$prefix}--combo-box > .#{$prefix}--list-box__field {
    padding: 0;
  }

  .#{$prefix}--combo-box.#{$prefix}--list-box {
    border-bottom: none;
  }
}

@include exports('combo-box') {
  @if feature-flag-enabled('components-x') {
    @include combo-box--x;
  } @else {
    @include combo-box;
  }
}
