---
import { cn } from "@/lib/utils.ts";

const anim = {
  old: {
    name: "pageLeave",
    duration: "0.0s",
    easing: "ease-out",
    fillMode: "forwards",
  },
  new: {
    name: "pageEnter",
    duration: "0.7s",
    easing: "cubic-bezier(0.23, 1, 0.32, 1)",
    fillMode: "forwards",
  },
};

export interface Props {
  inset?: boolean;
}

const slideAnimation = {
  forwards: anim,
  backwards: anim,
};

const { inset = true } = Astro.props;
---

<main
  transition:animate={slideAnimation}
  class={cn("min-h-screen", inset ? "pt-height-header" : "")}
>
  <slot />
</main>
