import { useMutation } from '@tanstack/react-query';
import { NullSeamClientError, useSeamClient } from '../../../lib/seam/use-seam-client.js';
export function useGenerateAccessCodeCode() {
    const { client } = useSeamClient();
    return useMutation({
        mutationFn: async (variables) => {
            if (client === null)
                throw new NullSeamClientError();
            const { code } = await client.accessCodes.generateCode(variables);
            return code;
        },
    });
}
//# sourceMappingURL=use-generate-access-code-code.js.map