import { ComponentWrapper, ElementWrapper } from '@cloudscape-design/test-utils-core/dom'; import OptionWrapper from '../internal/option'; export declare class PromptInputMenuWrapper extends ComponentWrapper { findOptions(): Array; /** * Returns an option from the menu. * * @param optionIndex 1-based index of the option to select. */ findOption(optionIndex: number): OptionWrapper | null; /** * Returns an option from the menu by its value * * @param value The 'value' of the option. */ findOptionByValue(value: string): OptionWrapper | null; } export default class PromptInputWrapper extends ComponentWrapper { static rootSelector: string; /** * Finds the native textarea element. * * Note: When `menus` or `tokens` is defined, the component uses a contentEditable element instead of a textarea. * In this case, use findContentEditableElement() instead. */ findNativeTextarea(): ElementWrapper; /** * Finds the contentEditable element used when `menus` or `tokens` is defined. */ findContentEditableElement(): ElementWrapper | null; /** * Finds the action button. Note that, despite its typings, this may return null. */ findActionButton(): ElementWrapper; /** * Finds the secondary actions slot. Note that, despite its typings, this may return null. */ findSecondaryActions(): ElementWrapper; findSecondaryContent(): ElementWrapper | null; findCustomPrimaryAction(): ElementWrapper | null; /** * Finds the menu dropdown when `menus` or `tokens` is defined. */ findOpenMenu(): PromptInputMenuWrapper | null; /** * Gets the value of the component. * * Returns the current value of the textarea. * * When `menus` or `tokens` is defined, the component uses a contentEditable element. * Use findContentEditableElement().getElement().textContent instead. */ getTextareaValue(): string; /** * Sets the value of the textarea and calls the onChange handler. * * When `menus` or `tokens` is defined, the component uses a contentEditable element * and this method will have no effect. * * @param value value to set the textarea to. */ setTextareaValue(value: string): void; /** * Checks if the menu is currently open. */ isMenuOpen(): boolean; /** * Selects an option from the menu by simulating mouse events. * * @param value value of option to select */ selectMenuOptionByValue(value: string): void; /** * Selects an option from the menu by simulating mouse events. * * @param optionIndex 1-based index of the option to select */ selectMenuOption(optionIndex: number): void; }