import { createContext } from "@lit-labs/context"; import { Address } from "../controllers/autocomplete.parser"; export interface AddressContext { setAddress: (address: Address) => void; setShowDropdown: (value: boolean) => void; /** * Opens the dropdown to show previous search results * This is specifically used when the user clicks on the input * after having closed the dropdown */ reopenDropdownWithResults: () => void; /** * Checks if there are search results available * to be shown when reopening the dropdown */ hasSearchResults: () => boolean; } export const addressContext = createContext("address-context");