@use "../mixins";

@include mixins.keyframe(slide-out-up) {
  0% {
    transform: translate(0,0);
  }

  100% {
    transform: translate(0,-300%);
  }
}

@include mixins.keyframe(slide-out-down) {
  0% {
    transform: translate(0,0);
  }

  100% {
    transform: translate(0,300%);
  }
}

@include mixins.keyframe(slide-out-left) {
  0% {
    transform: translate(0,0);
  }

  100% {
    transform: translate(-300%,0);
  }
}

@include mixins.keyframe(slide-out-right) {
  0% {
    transform: translate(0,0);
  }

  100% {
    transform: translate(300%,0);
  }
}

@include mixins.keyframe(slide-in-up) {
  0% {
    transform: translate(0,-100%);
  }

  100% {
    transform: translate(0,0);
  }
}

@include mixins.keyframe(slide-in-down) {
  0% {
    transform: translate(0,100%);
  }

  100% {
    transform: translate(0,0);
  }
}

@include mixins.keyframe(slide-in-left) {
  0% {
    transform: translate(-100%,0);
  }

  100% {
    transform: translate(0,0);
  }
}

@include mixins.keyframe(slide-in-right) {
  0% {
    transform: translate(100%,0);
  }

  100% {
    transform: translate(0,0);
  }
}

@include mixins.keyframe(fade-in) {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@include mixins.keyframe(fade-out) {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@each $type in ('in', 'out') {
  @each $direction in ('up', 'down', 'left', 'right') {

    .slide-#{$type}-#{$direction}{
      @include mixins.animation(slide-#{$type}-#{$direction});
    }
  }
}

@each $type in ('in', 'out') {
  .fade-#{$type} {
    @include mixins.animation(fade-#{$type} ease-in);
  }
}