@use 'sass:meta';

/// Thoroughly hide an element.
///
/// @param {Bool} $maintain-layout [false] - If true, it will hide the
/// element but without removing the element from the layout structure. If false
/// it will hide the element and remove it from the DOM's layout structure.
///
/// @group Utilities
@mixin hide($maintain-layout: false) {
  @if not $maintain-layout {
    display: none !important;
  } @else if $maintain-layout {
    visibility: hidden;
  } @else {
    @error 'Incorrect value of `#{meta.inspect($maintain-laout)}` for the ' +
        '[ hide() ] mixin. Value must be either true, false, or null.';
  }
}
