UNPKG

@open-tender/utils

Version:

A library of utils for use with Open Tender applications that utilize our cloud-based Order API.

20 lines (19 loc) 1.48 kB
/// <reference types="react" /> import { CheckoutFormCustomer, ConfigBrand, CustomerCreate, NotificationChannel, RequestError, RequestStatus } from '@open-tender/types'; export declare const useSignUpGuestForm: (email: string, guest: CheckoutFormCustomer, loading: RequestStatus, error: RequestError, guestErrors: Record<string, string> | null, signUp: (data: CustomerCreate, token?: string, loginToken?: string) => void, submitGuest: (data: CheckoutFormCustomer) => void, tpls?: ConfigBrand['tpls'], notificationChannels?: NotificationChannel[], includeRecaptcha?: boolean, getRecaptchaToken?: () => Promise<string | null>, includeLoginRecaptcha?: boolean, getLoginRecaptchaToken?: () => Promise<string | null>, require_home_store?: boolean) => { submitRef: import("react").MutableRefObject<HTMLButtonElement | null>; inputRef: import("react").MutableRefObject<HTMLInputElement | null>; fields: import("@open-tender/types").FormFieldType[]; notificationFields: import("./useSignUpForm").NotificationCheckbox[]; data: CustomerCreate; comms: NotificationChannel[]; errors: Record<string, string>; disabled: boolean; guestDisabled: boolean; submitting: boolean; handleChange: (name: string, value: string | number | boolean) => void; handleSubmit: (evt?: React.FormEvent<HTMLFormElement>) => Promise<void>; handleGuest: () => void; handleComms: (name: NotificationChannel, value: boolean) => void; resetState: () => void; };