"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const reactClient = require("@contember/react-client");
const react = require("react");
const variables = require("../../lib/variables.cjs");
const useSingleTenantMutation = require("../../lib/useSingleTenantMutation.cjs");
const RESET_PASSWORD_MUTATION = `
resetPassword(token: $token, password: $password) {
	ok
	error {
		code
		developerMessage
	}
}
`;
const resetPasswordVariables = {
  token: variables.GQLVariable.Required(variables.GQLVariable.String),
  password: variables.GQLVariable.Required(variables.GQLVariable.String)
};
const useResetPassword = () => {
  const loginToken = reactClient.useLoginToken();
  return useSingleTenantMutation.useSingleTenantMutation(
    RESET_PASSWORD_MUTATION,
    resetPasswordVariables,
    react.useMemo(() => ({
      apiTokenOverride: loginToken
    }), [loginToken])
  );
};
exports.useResetPassword = useResetPassword;
//# sourceMappingURL=resetPassword.cjs.map
