"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const reactClient = require("@contember/react-client");
const react = require("react");
const ME_QUERY = `
	query {
		me {
			id
			person {
				id
				email
				otpEnabled
			}

			projects {
				project {
					slug
					name
				}

				memberships {
					role
					variables {
						name
						values
					}
				}
			}

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