@use "../../base/space" as sp;
@use "../../base/mixins/meta-class" as mc;

$_directions: (
  "": "",
  "top-": "top",
  "right-": "right",
  "bottom-": "bottom",
  "left-": "left",
);

@each $key, $value in sp.$spacers {
  @each $dir-name, $dir-prop in $_directions {
    @if $dir-prop == "" {
      @include mc.meta("qo-padding-#{$dir-name}#{$key}", (padding: $value));
    } @else {
      @include mc.meta("qo-padding-#{$dir-name}#{$key}", (padding-#{$dir-prop}: $value));
    }
  }

  @include mc.meta("qo-padding-x-#{$key}", (padding-left: $value, padding-right: $value));
  @include mc.meta("qo-padding-y-#{$key}", (padding-top: $value, padding-bottom: $value));
}

// @deprecated — typo aliases kept for backwards compatibility
.qo-padding-botttom-sm { padding-bottom: sp.$space-sm; }
.qo-padding-botttom-md { padding-bottom: sp.$space-md; }
.qo-padding-botttom-lg { padding-bottom: sp.$space-lg; }
.qo-padding-botttom-xl { padding-bottom: sp.$space-xl; }
