import { useState as e, useCallback as c, useEffect as d } from "react";
import { v as u } from "./index-CeEMms9z.js";
function p() {
  const [o, r] = e([]), [l, a] = e(!0), [i, s] = e(null), t = c(async () => {
    a(!0), s(null);
    try {
      const n = await u.myTenants.getAll();
      r(n);
    } catch (n) {
      console.error("Failed to load admin tenants:", n), s("Failed to load tenants");
    } finally {
      a(!1);
    }
  }, []);
  return d(() => {
    t();
  }, [t]), { tenants: o, loading: l, error: i, refresh: t };
}
export {
  p as u
};
//# sourceMappingURL=useAdminTenants-C2kw_MWU.js.map
