import { useLoginToken } from "@contember/react-client";
import { useMemo } from "react";
import { GQLVariable } from "../../lib/variables.js";
import { useSingleTenantMutation } from "../../lib/useSingleTenantMutation.js";
const RESET_PASSWORD_MUTATION = `
resetPassword(token: $token, password: $password) {
	ok
	error {
		code
		developerMessage
	}
}
`;
const resetPasswordVariables = {
  token: GQLVariable.Required(GQLVariable.String),
  password: GQLVariable.Required(GQLVariable.String)
};
const useResetPassword = () => {
  const loginToken = useLoginToken();
  return useSingleTenantMutation(RESET_PASSWORD_MUTATION, resetPasswordVariables, useMemo(() => ({
    apiTokenOverride: loginToken
  }), [loginToken]));
};
export { useResetPassword };
//# sourceMappingURL=resetPassword.js.map
