import { useState as s, useEffect as l } from "react";
import { a as i } from "./accessRequestsApi-ZXFPCid2.js";
function q() {
  const [u, t] = s([]), [c, a] = s(!1), [n, r] = s(null), o = async () => {
    a(!0), r(null);
    try {
      const e = await i.getMyRequests();
      t(e || []);
    } catch (e) {
      r(e.message || "Failed to load requests"), t([]);
    } finally {
      a(!1);
    }
  };
  return l(() => {
    o();
  }, []), { requests: u, loading: c, error: n, reload: o };
}
export {
  q as u
};
//# sourceMappingURL=useUserAccessRequests-BB6FHW14.js.map
