import { createContext as o, useContext as s, useEffect as r } from "react";
const n = o({
  props: {
    buttons: [],
    title: "",
    previousPageUrl: ""
  },
  setProps: () => {
  }
}), i = (t) => {
  const e = s(n);
  if (!e)
    throw new Error(
      "useItemCreation must be used within an ItemCreationTemplate"
    );
  r(() => {
    e.setProps(t);
  }, [t]);
};
export {
  n as I,
  i as u
};
