import React from 'react';
import { OrderDTO, AddressDTO } from '@sentecacommerce/sdk';
import { MutateFunction, QueryResult } from 'react-query';
import { UseBillingResultType, UsePaymentResultType, UseShippingResultType } from './hooks';
import { ShippingValidationsType, BillingAddressValidationType } from './utils';
export declare const CheckoutFormContext: React.Context<CheckoutFormContextType>;
export declare type CheckoutCustomState = {};
export declare function CheckoutFormContextProvider({ children, defaultStep, errorLabels, enableSavedAddressList, withPersistBeforePageLeave, shippingValidations, validateBillingAddress, enableSaveBillingAddress, enableSavedBillingAddressList, countryCode, enableSaveAddress, autofillShippingPersonalData, onSubmit, paymentEnabledOnStep, getPaymentMethodsWhenShippingMethodIsSelected, shippingEnabledOnStep, billingEnabledOnStep, customState: initialCustomState, redirectTimeout, onBeforeRedirect, onSuccess, onError, isBoricaInDevMode, withPixelMeta, requiredFieldsOnShippingStep, requiredFieldsOnBillingAddressStep, enableNoShippingMethodMode, }: Props): JSX.Element;
export declare type CheckoutFormOnSubmitData = {
    isShippingValid: boolean;
    setIsShippingSubmitting: (value: boolean) => void;
    isBillingValid: boolean;
    setIsBillingSubmitting: (value: boolean) => void;
    isPaymentValid: boolean;
    setIsPaymentSubmitting: (value: boolean) => void;
    step: CheckoutFormStepsEnum;
    updateStep: (step: CheckoutFormStepsEnum) => void;
    saveOrder: MutateFunction<OrderDTO, unknown, any, unknown>;
    updateServerErrors: (errors: any) => void;
    scrollToFirstError: () => void;
    shippingState: UseShippingResultType;
    shippingAddress?: AddressDTO;
};
declare type Props = {
    children: any;
    defaultStep: CheckoutFormStepsEnum;
    errorLabels: CheckoutFormErrorLabelsType;
    withPersistBeforePageLeave: boolean;
    countryCode: string;
    onSubmit: (data: CheckoutFormOnSubmitData) => void;
    onError: (error: any) => void;
    onSuccess: (order: OrderDTO) => void;
    redirectTimeout?: number;
    onBeforeRedirect?: () => void;
    customState?: CheckoutCustomState;
    enableSavedAddressList: boolean;
    shippingValidations?: ShippingValidationsType;
    enableSaveAddress: boolean;
    autofillShippingPersonalData: boolean;
    autoSelectDefaultShippingAddress: boolean;
    enableSaveBillingAddress: boolean;
    validateBillingAddress?: BillingAddressValidationType;
    enableSavedBillingAddressList: boolean;
    autoSelectDefaultBillingAddress: boolean;
    paymentEnabledOnStep?: CheckoutFormStepsEnum;
    getPaymentMethodsWhenShippingMethodIsSelected?: boolean;
    shippingEnabledOnStep: CheckoutFormStepsEnum;
    billingEnabledOnStep: CheckoutFormStepsEnum;
    isBoricaInDevMode?: boolean;
    withPixelMeta?: boolean;
    requiredFieldsOnShippingStep?: string[];
    requiredFieldsOnBillingAddressStep?: string[];
    enableNoShippingMethodMode?: boolean;
};
declare type ServerErrors = {
    [key: string]: any;
} | null;
export declare enum CheckoutFormStepsEnum {
    Basket = "Basket",
    Shipping = "Shipping",
    BillingAddress = "BillingAddress",
    Payment = "Payment",
    Preview = "Preview",
    All = "All"
}
export declare type CheckoutFormErrorsResultType = {
    [key: string]: string;
} | null | undefined;
export declare type ShippingFormErrorLabels = {
    fieldIsRequired: string;
    fillStreetNumberBuildingEntranceOrApartment: string;
    streetIsRequired: string;
    invalidPhoneNumber?: string;
    quarterIsRequired: string;
    cantFindStreetOrQuarterMessage: string;
    cityIsRequired: string;
    emailIsRequired: string;
    officeIsRequired: string;
    selectCourier: string;
    noStoreSelected: string;
};
export declare type CheckoutFormErrorLabelsType = ShippingFormErrorLabels & {
    selectPaymentMethod: string;
};
export declare type CheckoutFormContextType = {
    setStep: (step: CheckoutFormStepsEnum) => void;
    step: CheckoutFormStepsEnum;
    serverErrors: ServerErrors;
    updateServerErrors: (errors: any) => void;
    errorRef: (error: HTMLElement) => void;
    errorFields: HTMLElement[];
    errorLabels: CheckoutFormErrorLabelsType;
    orderQuery: QueryResult<OrderDTO, unknown>;
    shippingState: UseShippingResultType;
    paymentState: UsePaymentResultType;
    billingState: UseBillingResultType;
};
export declare const useCheckoutFormStep: () => {
    currentStep: CheckoutFormStepsEnum;
    updateStep: (step: CheckoutFormStepsEnum) => void;
};
export declare const useCheckoutFormOrder: () => QueryResult<OrderDTO, unknown>;
export declare const useCheckoutFormErrorLabels: () => CheckoutFormErrorLabelsType;
export declare const useCheckoutFormServerErrors: () => {
    serverErrors: ServerErrors;
    updateServerErrors: (errors: any) => void;
};
export declare const useCheckoutFormBillingState: () => UseBillingResultType;
export declare const useCheckoutFormShippingState: () => UseShippingResultType;
export declare const useCheckoutErrorFields: () => {
    errorFields: HTMLElement[];
    errorRef: (error: HTMLElement) => void;
};
export declare const useCheckoutFormPaymentState: () => UsePaymentResultType;
export {};
