import { jsx as e } from "react/jsx-runtime";
import { useAuth as m } from "./AuthContext.mjs";
import s from "./components/NoPermission/index.mjs";
const d = ({
  branding: o,
  children: r
}) => {
  const {
    loading: n,
    user: t,
    error: i
  } = m();
  return n ? /* @__PURE__ */ e("div", {
    children: "加载中..."
  }) : t != null && t.token ? r : /* @__PURE__ */ e(s, {
    title: i == null ? void 0 : i.message,
    branding: o
  });
};
export {
  d as default
};
