// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
// See LICENSE in the project root for license information.

// ---------------------------------------------------------------------
// Variables are defined by baseline Design Tokens

/// The purpose of this function is to evaluate if a requested var is in the supplied array
/// @group utility
/// @parameter {Variable} $list [null] - variable list to be evaluated
/// @parameter {Item} $var [] - item in list
/// @example scss - pass string into function
///   ods-contains($options, $value)
/// @example scss - import dependency
///   @import "./node_modules/@aurodesignsystem/webcorestylesheets/dist/utilityFunctions/contains";

@function auro_contains($list, $var) {
  $eval: false;

  @each $item in $list {
    @if $item == $var {
      $eval: true;
    }
  }

  @return $eval;
}
