@use '../abstracts/functions' as fn;

@mixin flex-base {
  display: flex;
}

.flex {
  @include flex-base;

  // Комбинации justify + align
  &-center {
    @include flex-base;
    align-items: center;
    justify-content: center;
  }

  // justify-content
  &-jc-start {
    @include flex-base;
    justify-content: flex-start;
  }

  &-jc-end {
    @include flex-base;
    justify-content: flex-end;
  }

  &-jc-center {
    @include flex-base;
    justify-content: center;
  }

  &-jcsb {
    @include flex-base;
    justify-content: space-between;
  }

  &-jc-around {
    @include flex-base;
    justify-content: space-around;
  }

  &-jc-evenly {
    @include flex-base;
    justify-content: space-evenly;
  }

  // align-items
  &-align-start {
    @include flex-base;
    align-items: flex-start;
  }

  &-align-end {
    @include flex-base;
    align-items: flex-end;
  }

  &-align-center {
    @include flex-base;
    align-items: center;
  }

  &-align-stretch {
    @include flex-base;
    align-items: stretch;
  }

  &-align-baseline {
    @include flex-base;
    align-items: baseline;
  }

  // flex-direction
  &-col {
    @include flex-base;
    flex-direction: column;
  }

  &-col-reverse {
    @include flex-base;
    flex-direction: column-reverse;
  }

  &-col-center {
    @include flex-base;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  &-row {
    @include flex-base;
    flex-direction: row;
  }

  &-row-reverse {
    @include flex-base;
    flex-direction: row-reverse;
  }

  &-row-center {
    @include flex-base;
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }

  // flex-wrap
  &-wrap {
    @include flex-base;
    flex-wrap: wrap;
  }

  &-nowrap {
    @include flex-base;
    flex-wrap: nowrap;
  }

  &-wrap-reverse {
    @include flex-base;
    flex-wrap: wrap-reverse;
  }

  // flex shorthand
  &-1 {
    flex: 1;
  }

  &-auto {
    flex: auto;
  }

  &-none {
    flex: none;
  }

  // flex-grow
  &-grow-0 {
    flex-grow: 0;
  }

  &-grow-1 {
    flex-grow: 1;
  }

  // flex-shrink
  &-shrink-0 {
    flex-shrink: 0;
  }

  &-shrink-1 {
    flex-shrink: 1;
  }
}