////
/// (c) hidoo | MIT License
/// @group box features
////

@use "sass:meta";

/// initialize box settings
/// @param {String} $display ["block"] - setting for `display`
/// @param {String} $overflow [null] - setting for `overflow`
/// @param {String} $box-sizing ["content-box"] - setting for `box-sizing`
/// @param {String} $position ["relative"] - setting for `position`
/// @param {String} $list-style [0] - setting for `list-style`
/// @param {Number|List} $margin [0] - setting for `margin`
/// @param {Number|List} $padding [0] - setting for `padding`
/// @param {Number|List} $border [0] - setting for `border`
///
/// @deprecated
///
/// @example scss - scss inputs
///   .selector {
///     @include mixin.box-initialize();
///   }
///
/// @example css - css outputs
///   .selector {
///     display: block;
///     box-sizing: content-box;
///     position: relative;
///     list-style: none;
///     margin: 0;
///     padding: 0;
///     border: 0;
///   }
///
@mixin initialize(
  $display: "block",
  $overflow: null,
  $box-sizing: "content-box",
  $position: "relative",
  $list-style: "none",
  $margin: 0,
  $padding: 0,
  $border: 0
) {
  @warn "[DEPRECATED] mixin.box-initialize is deprecated.";

  // set display property only if $display is valid string
  @if meta.type-of($display) == "string" and $display != "" {
    display: #{$display};
  }

  // set overflow property only if $overflow is valid string
  @if meta.type-of($overflow) == "string" and $overflow != "" {
    overflow: #{$overflow};
  }

  position: #{$position};

  box-sizing: #{$box-sizing};
  margin: #{$margin};
  padding: #{$padding};
  border: #{$border};

  // set list-style property only if $list-style is valid string
  @if meta.type-of($list-style) == "string" and $list-style != "" {
    list-style: #{$list-style};
  }
}
