/* This file is automatically generated for @graphcommerce/graphql */

export * from '.'
import { Plugin as MagentoCartGraphqlProvider } from '@graphcommerce/magento-cart/plugins/MagentoCartGraphqlProvider'
import { Plugin as MagentoCustomerGraphqlProvider } from '@graphcommerce/magento-customer/plugins/MagentoCustomerGraphqlProvider'
import { ComponentProps } from 'react'
import { GraphQLProvider as GraphQLProviderBase } from '.'

/**
 * Interceptor for `<GraphQLProvider/>` with these plugins:
 * 
 * - `@graphcommerce/magento-customer/plugins/MagentoCustomerGraphqlProvider`
 * - `@graphcommerce/magento-cart/plugins/MagentoCartGraphqlProvider`
 */
type GraphQLProviderProps = ComponentProps<typeof GraphQLProviderBase>

function MagentoCustomerGraphqlProviderInterceptor(props: GraphQLProviderProps) {
  return <MagentoCustomerGraphqlProvider {...props} Prev={GraphQLProviderBase} />
}
function MagentoCartGraphqlProviderInterceptor(props: GraphQLProviderProps) {
  return <MagentoCartGraphqlProvider {...props} Prev={MagentoCustomerGraphqlProviderInterceptor} />
}
export const GraphQLProvider = MagentoCartGraphqlProviderInterceptor
