export type CurrentView = | 'closed' | 'new' | 'list' | 'edit' | 'modal-new' | 'modal-edit'; export interface FormProps { handleSubmit: (event: React.FormEvent) => void; setCurrentCountry(o: Option): void; setCurrentState(o: Option): void; currentCountry: Option; countries: Array; currentState: Option; states: any; } export interface SectionProps { onAddressEdit(address: Address): Promise; onNewAddress(address: Address): Promise; onAddressChange(id: string): Promise; initialSelectionId: string; defaultCountry: Option; useOldStyles?: boolean; countries: Array; accessToken: string; cartId: string; states: any; } export interface Option { label: string; value: string; } export interface AddressAttributes { [attribute: string]: string | number; address_line1: string; address_line2: string; country_code: string; postal_code: string; first_name: string; last_name: string; user_id: number; source: string; state: string; phone: string; city: string; id?: string; } export interface Address { attributes: AddressAttributes; type?: 'address'; id?: string; } export interface ModalAddresses { nonValidated: AddressAttributes; validated: AddressAttributes; } export interface PlaceElement { types: Array; short_name: Array; } export interface GoogleAddress { [key: string]: any; } export interface Autocomplete { current: {[key: string]: any}; } export interface GoogleWindow extends Window { google: {maps: {[key: string]: any}}; }