import React, { createContext, useState } from "react";

export const AppContext = createContext<any>(null);

export function AppContextProvider({ children }:{children: React.ReactNode}) {
  const [preset, setPreset] = useState("cubeToRight");
  const [enterAnimation, setEnterAnimation] = useState("");
  const [exitAnimation, setExitAnimation] = useState("");

  return (
    <AppContext.Provider
      value={{
        preset,
        enterAnimation,
        exitAnimation,
        setPreset,
        setEnterAnimation,
        setExitAnimation
      }}
    >
      {children}
    </AppContext.Provider>
  );
}
