import { useTenantGraphQlClient } from "@contember/react-client";
import { useCallback } from "react";
const ME_QUERY = `
	query {
		me {
			person {
				id
				email
				otpEnabled
			}

			projects {
				project {
					slug
					name
				}

				memberships {
					role
					variables {
						name
						values
					}
				}
			}

			permissions {
				canCreateProject
			}
		}
	}
`;
const useFetchMe = () => {
  const client = useTenantGraphQlClient();
  return useCallback(async () => {
    return await client.sendRequest(ME_QUERY, {});
  }, [client]);
};
export { useFetchMe };
//# sourceMappingURL=me.js.map
