import x from "./index-extends.js";
import h from "./index-objectWithoutPropertiesLoose.js";
import * as u from "react";
import { clsx as a } from "./index-clsx.m.js";
import { pickersSlideTransitionClasses as e, getPickersSlideTransitionUtilityClass as v } from "./index-pickersSlideTransitionClasses.js";
import { jsx as s } from "react/jsx-runtime";
import p from "./index-CSSTransition.js";
import A from "./index-composeClasses.js";
import $ from "./index-styled.js";
import g from "./index-TransitionGroup.js";
const C = ["children", "className", "reduceAnimations", "slideDirection", "transKey"], L = (i) => {
  const {
    classes: t
  } = i;
  return A({
    root: ["root"]
  }, v, t);
}, c = 350, T = $(g, {
  name: "PrivatePickersSlideTransition",
  slot: "Root",
  overridesResolver: (i, t) => [t.root, {
    [`.${e["slideEnter-left"]}`]: t["slideEnter-left"]
  }, {
    [`.${e["slideEnter-right"]}`]: t["slideEnter-right"]
  }, {
    [`.${e.slideEnterActive}`]: t.slideEnterActive
  }, {
    [`.${e.slideExit}`]: t.slideExit
  }, {
    [`.${e["slideExitActiveLeft-left"]}`]: t["slideExitActiveLeft-left"]
  }, {
    [`.${e["slideExitActiveLeft-right"]}`]: t["slideExitActiveLeft-right"]
  }]
})(({
  theme: i
}) => {
  const t = i.transitions.create("transform", {
    duration: c,
    easing: "cubic-bezier(0.35, 0.8, 0.4, 1)"
  });
  return {
    display: "block",
    position: "relative",
    overflowX: "hidden",
    "& > *": {
      position: "absolute",
      top: 0,
      right: 0,
      left: 0
    },
    [`& .${e["slideEnter-left"]}`]: {
      willChange: "transform",
      transform: "translate(100%)",
      zIndex: 1
    },
    [`& .${e["slideEnter-right"]}`]: {
      willChange: "transform",
      transform: "translate(-100%)",
      zIndex: 1
    },
    [`& .${e.slideEnterActive}`]: {
      transform: "translate(0%)",
      transition: t
    },
    [`& .${e.slideExit}`]: {
      transform: "translate(0%)"
    },
    [`& .${e["slideExitActiveLeft-left"]}`]: {
      willChange: "transform",
      transform: "translate(-100%)",
      transition: t,
      zIndex: 0
    },
    [`& .${e["slideExitActiveLeft-right"]}`]: {
      willChange: "transform",
      transform: "translate(100%)",
      transition: t,
      zIndex: 0
    }
  };
}), _ = (i) => {
  const {
    children: t,
    className: r,
    reduceAnimations: d,
    slideDirection: n,
    transKey: m
  } = i, f = h(i, C), o = L(i);
  if (d)
    return /* @__PURE__ */ s("div", {
      className: a(o.root, r),
      children: t
    });
  const l = {
    exit: e.slideExit,
    enterActive: e.slideEnterActive,
    enter: e[`slideEnter-${n}`],
    exitActive: e[`slideExitActiveLeft-${n}`]
  };
  return /* @__PURE__ */ s(T, {
    className: a(o.root, r),
    childFactory: (E) => /* @__PURE__ */ u.cloneElement(E, {
      classNames: l
    }),
    role: "presentation",
    children: /* @__PURE__ */ s(p, x({
      mountOnEnter: !0,
      unmountOnExit: !0,
      timeout: c,
      classNames: l
    }, f, {
      children: t
    }), m)
  });
};
export {
  _ as PickersSlideTransition,
  c as slideAnimationDuration
};
