import { CustomerAddressGraphql } from '@evershop/evershop/types/customerAddress'; import React, { ReactNode } from 'react'; type ExtendedCustomerAddress = CustomerAddressGraphql & { addressId: string | number; isDefault?: boolean; updateApi?: string; deleteApi?: string; }; export interface OrderItem { orderItemId: string; uuid: string; productId: string; qty: number; productSku: string; productName: string; productUrl: string; thumbnail?: string; productWeight: { value: number; unit: string; }; variantOptions?: { attributeCode: string; attributeName: string; attributeId: number; optionId: number; optionText: string; }[]; productPrice: { value: number; text: string; }; productPriceInclTax: { value: number; text: string; }; finalPrice: { value: number; text: string; }; finalPriceInclTax: { value: number; text: string; }; taxPercent: number; taxAmount: { value: number; text: string; }; taxAmountBeforeDiscount: { value: number; text: string; }; discountAmount: { value: number; text: string; }; lineTotal: { value: number; text: string; }; subTotal: { value: number; text: string; }; lineTotalWithDiscount: { value: number; text: string; }; lineTotalWithDiscountInclTax: { value: number; text: string; }; lineTotalInclTax: { value: number; text: string; }; total: { value: number; text: string; }; variantGroupId?: number; } export interface Order { orderId: number; uuid: string; orderNumber: string; currency: string; customerId?: number; customerGroupId?: number; customerEmail?: string; customerFullName?: string; coupon?: string; shippingMethod?: string; shippingMethodName?: string; paymentMethod?: string; paymentMethodName?: string; shippingNote?: string; status: { name: string; code: string; badge: string; }; shipmentStatus?: { name: string; code: string; badge: string; }; paymentStatus?: { name: string; code: string; badge: string; }; items: OrderItem[]; totalQty: number; totalWeight: { value: number; unit: string; }; taxAmount: { value: number; text: string; }; totalTaxAmount: { value: number; text: string; }; taxAmountBeforeDiscount: { value: number; text: string; }; discountAmount: { value: number; text: string; }; shippingFeeExclTax: { value: number; text: string; }; shippingFeeInclTax: { value: number; text: string; }; shippingTaxAmount: { value: number; text: string; }; subTotal: { value: number; text: string; }; subTotalInclTax: { value: number; text: string; }; subTotalWithDiscount: { value: number; text: string; }; subTotalWithDiscountInclTax: { value: number; text: string; }; grandTotal: { value: number; text: string; }; billingAddress?: CustomerAddressGraphql; shippingAddress?: CustomerAddressGraphql; createdAt: { value: string; text: string; }; updatedAt: { value: string; text: string; }; } interface Customer { uuid: string; email: string; fullName: string; groupId: string; addresses: ExtendedCustomerAddress[]; orders: Order[]; addAddressApi: string; createdAt: { value: string; text: string; }; [key: string]: unknown; } interface CustomerState { customer: Customer | undefined; isLoading: boolean; } interface CustomerContextValue extends CustomerState { } interface CustomerDispatchContextValue { login: (data: { email: string; password: string; [key: string]: unknown; }, redirectUrl: string) => Promise; register: (data: { full_name: string; email: string; password: string; [key: string]: unknown; }, loginIfSuccess: boolean, redirectUrl: string) => Promise; logout: () => Promise; setCustomer: (customer: Customer | undefined) => void; addAddress: (addressData: Omit) => Promise; updateAddress: (addressId: string | number, addressData: Partial) => Promise; deleteAddress: (addressId: string | number) => Promise; } interface CustomerProviderProps { children: ReactNode; loginAPI: string; logoutAPI: string; registerAPI: string; initialCustomer?: Customer; } export declare function CustomerProvider({ children, loginAPI, registerAPI, logoutAPI, initialCustomer }: CustomerProviderProps): React.JSX.Element; export declare const useCustomer: () => CustomerContextValue; export declare const useCustomerDispatch: () => CustomerDispatchContextValue; export type { Customer, CustomerState, ExtendedCustomerAddress };