import { j as a } from "./index-CwSaRXXg.js";
const c = {
  // User endpoints
  createRequest: async (e, s, t) => (await a.post(`/api/tenants/${e}/applications/${s}/request`, t)).data,
  getMyRequests: async () => (await a.get("/api/my/access-requests")).data,
  // Admin endpoints
  getRequestsByApplication: async (e, s) => {
    const t = s ? `?status=${s}` : "";
    return (await a.get(`/api/applications/${e}/access-requests${t}`)).data;
  },
  getRequestsByTenant: async (e, s) => {
    const t = s ? `?status=${s}` : "";
    return (await a.get(`/api/tenants/${e}/access-requests${t}`)).data;
  },
  approveRequest: async (e, s) => (await a.post(`/api/access-requests/${e}/approve`, s)).data,
  denyRequest: async (e, s) => (await a.post(`/api/access-requests/${e}/deny`, { notes: s })).data,
  getAllRequests: async (e, s) => {
    const t = new URLSearchParams();
    e && t.set("status", e), s && t.set("tenantId", s);
    const n = t.toString();
    return (await a.get(`/api/access-requests${n ? `?${n}` : ""}`)).data;
  }
};
export {
  c as a
};
//# sourceMappingURL=accessRequestsApi-ZXFPCid2.js.map
