//
// 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.
//

@import 'feature-flags';

/// Used for enabling features
/// @access public
/// @param {String} $feature - Feature from `$default-feature-flags`
/// @return {Bool}
/// @example scss
///   // Will include code inside of { } only if `components-x` is true
///   @if feature-flag-enabled('components-x') { ... }
/// @group feature-flags
@function feature-flag-enabled($feature) {
  @if variable-exists(feature-flags) ==
    true and
    map-get($feature-flags, $feature) ==
    true
  {
    @return true;
  }
  @return false;
}
