import { createContext } from 'react' ; import { addToCart , AddToCart , OrderState , CreateOrder , SetGiftCardOrCouponCode , RemoveGiftCardOrCouponCode , SaveAddressToCustomerAddressBook , setOrderErrors , createOrder , setGiftCardOrCouponCode , removeGiftCardOrCouponCode , saveAddressToCustomerAddressBook , addResourceToInclude , updateOrder , getOrderContext , } from '#reducers/OrderReducer' ; type DefaultContext = { createOrder : CreateOrder ; addToCart : AddToCart ; setOrderErrors : typeof setOrderErrors ; setGiftCardOrCouponCode : SetGiftCardOrCouponCode ; removeGiftCardOrCouponCode : RemoveGiftCardOrCouponCode ; saveAddressToCustomerAddressBook : SaveAddressToCustomerAddressBook ; addResourceToInclude : typeof addResourceToInclude ; getOrder : getOrderContext ; updateOrder : typeof updateOrder ; } & OrderState ; export const defaultOrderContext = { addToCart , createOrder , setOrderErrors , setGiftCardOrCouponCode , removeGiftCardOrCouponCode , saveAddressToCustomerAddressBook , addResourceToInclude , getOrder : async ( _id ) => { return ; } , updateOrder , } ; const OrderContext = createContext < DefaultContext > ( defaultOrderContext ) ; export default OrderContext ;