import { provide as t, inject as n } from "vue";
import { createSidebar as s } from "../helpers/create-sidebar.js";
const i = Symbol(), l = (e, r) => {
  if (e && r) {
    const a = s(e, r);
    return t(i, a), a;
  }
  const o = n(i);
  if (!o)
    throw new Error(
      "useSidebar() was called without a collection and no sidebar instance was found. Make sure to call useSidebar(collection) in a parent component first."
    );
  return o;
};
export {
  i as SIDEBAR_SYMBOL,
  l as useSidebar
};
