import { varTranExit as t, varTranEnter as a } from "./transition.js";
const s = (e) => {
  const i = e?.distance || 120, n = e?.durationIn, o = e?.durationOut, y = e?.easeIn, c = e?.easeOut;
  return {
    // IN
    in: {
      initial: { opacity: 0 },
      animate: { opacity: 1, transition: a },
      exit: { opacity: 0, transition: t }
    },
    inUp: {
      initial: { y: i, opacity: 0 },
      animate: { y: 0, opacity: 1, transition: a({ durationIn: n, easeIn: y }) },
      exit: { y: i, opacity: 0, transition: t({ durationOut: o, easeOut: c }) }
    },
    inDown: {
      initial: { y: -i, opacity: 0 },
      animate: { y: 0, opacity: 1, transition: a({ durationIn: n, easeIn: y }) },
      exit: { y: -i, opacity: 0, transition: t({ durationOut: o, easeOut: c }) }
    },
    inLeft: {
      initial: { x: -i, opacity: 0 },
      animate: { x: 0, opacity: 1, transition: a({ durationIn: n, easeIn: y }) },
      exit: { x: -i, opacity: 0, transition: t({ durationOut: o, easeOut: c }) }
    },
    inRight: {
      initial: { x: i, opacity: 0 },
      animate: { x: 0, opacity: 1, transition: a({ durationIn: n, easeIn: y }) },
      exit: { x: i, opacity: 0, transition: t({ durationOut: o, easeOut: c }) }
    },
    // OUT
    out: {
      initial: { opacity: 1 },
      animate: { opacity: 0, transition: a({ durationIn: n, easeIn: y }) },
      exit: { opacity: 1, transition: t({ durationOut: o, easeOut: c }) }
    },
    outUp: {
      initial: { y: 0, opacity: 1 },
      animate: { y: -i, opacity: 0, transition: a({ durationIn: n, easeIn: y }) },
      exit: { y: 0, opacity: 1, transition: t({ durationOut: o, easeOut: c }) }
    },
    outDown: {
      initial: { y: 0, opacity: 1 },
      animate: { y: i, opacity: 0, transition: a({ durationIn: n, easeIn: y }) },
      exit: { y: 0, opacity: 1, transition: t({ durationOut: o, easeOut: c }) }
    },
    outLeft: {
      initial: { x: 0, opacity: 1 },
      animate: { x: -i, opacity: 0, transition: a({ durationIn: n, easeIn: y }) },
      exit: { x: 0, opacity: 1, transition: t({ durationOut: o, easeOut: c }) }
    },
    outRight: {
      initial: { x: 0, opacity: 1 },
      animate: { x: i, opacity: 0, transition: a({ durationIn: n, easeIn: y }) },
      exit: { x: 0, opacity: 1, transition: t({ durationOut: o, easeOut: c }) }
    }
  };
};
export {
  s as varFade
};
