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.24 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) => void, submitGuest: (data: CheckoutFormCustomer) => void, tpls?: ConfigBrand['tpls'], notificationChannels?: NotificationChannel[]) => { 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>) => void; handleGuest: () => void; handleComms: (name: NotificationChannel, value: boolean) => void; resetState: () => void; };