/// Generic `deprecate` mixin that is being used to indicate that a component is
/// no longer going to be present in the next major release of Carbon.
/// @access public
/// @param {String} $reason - The message
/// @param {Bool} $condition [true] - `true` to emit the given deprecation messsage
/// @param {Bool} $remove-deprecated [false] - `true` to omit the content if $condition is `true`
/// @group global-deprecate
@mixin deprecate($reason, $condition: true, $remove-deprecated: false) {
  $deprecations--entry: false !default;

  @if not $condition {
    @content;
  } @else {
    @if ($deprecations--entry == true) {
      $deprecations--reasons: append($deprecations--reasons, $reason) !global;
    } @else {
      @warn 'Deprecated code was found, this code will be removed before the next release of Carbon. REASON: #{$reason}';
    }
    @if not $remove-deprecated {
      @content;
    }
  }
}
