import React from 'react'; import { KeyedMutator } from 'swr'; import { ToggleState } from '../../../hooks/use-toggle-state'; import { StandardStorefrontClient } from '.'; import { _CartFragment } from './generated'; declare type LineItem = { merchandiseId: string; quantity: number; attributes?: { key: string; value: string; }[]; }; declare type Context = { onAddLineItem: (params: LineItem, dontMutateState?: boolean) => Promise; onUpdateLineItem: (params: LineItem, dontMutateState?: boolean) => Promise; onRemoveLineItem: (params: { merchandiseId: string; }, dontMutateState?: boolean) => Promise; cart: _CartFragment | undefined | null; cartItemsCount: number | undefined; cartToggleState: ToggleState; getOrCreateCart: () => Promise<_CartFragment | null | undefined>; mutateCart: KeyedMutator<_CartFragment | null | undefined>; }; declare const Context: React.Context; declare type InternalContextProviderProps = { client: StandardStorefrontClient; appCartId: string; children?: React.ReactNode; }; export declare const StorefrontProvider: React.FC; export declare const useStorefront: () => Context; export {};