import type{LyraToastItem}from'../components/overlays/toast/toast-item.class.js';export interface WaitForLyraElementOptions{ /** * Root to search and observe for connected elements. Defaults to `document`. Pass a component's * own `shadowRoot`/`renderRoot` to scope the search to inside an open shadow tree instead of * light DOM. */ root?:Node&ParentNode; /** Extra filter run against every element `selector` matches, e.g. by rendered text or a data attribute. */ match?:(element:T)=>boolean; /** Bounded wait, in milliseconds, before rejecting. Default 2000. */ timeoutMs?:number;} /** * Resolves once an element matching `selector` (and, if given, `options.match`) is connected under * `options.root` and upgraded; rejects with a descriptive `Error` after `options.timeoutMs` * (default 2000ms). See the module doc above for exactly what "connected and upgraded" requires and * how resolution is driven. * * @example * ```ts * toast('Saved'); // fire-and-forget; toast.class.js/toast-item.class.js are still importing * const item = await waitForLyraElement('lr-toast-item', { * match: (el) => el.textContent?.trim() === 'Saved', * }); * ``` */ export declare function waitForLyraElement(selector:string,options?:WaitForLyraElementOptions):Promise; /** A toast item's rendered text (exact, trimmed), or a predicate over the item itself. */ export type ToastMatch=string|((item:LyraToastItem)=>boolean); /** * Resolves once a `` matching `match` is connected and upgraded -- the named * convenience for the exact gap described in the module doc above: `toast()` mounts its element * through a dynamic `import()`, so a fire-and-forget call needs an awaitable rather than an * immediate DOM query. A string `match` compares against the item's trimmed `textContent` * (`toast('Saved')` sets it verbatim, so `waitForToast('Saved')` is the common case); pass a * predicate for anything else (a substring, an icon/action check, or matching a specific variant). * Omitting `match` resolves the first toast item to mount. Rejects with a descriptive `Error` after * `options.timeoutMs` (default 2000ms) -- the same bounded contract as {@link waitForLyraElement}. * * @example * ```ts * toast('Saved'); * const item = await waitForToast('Saved'); * expect(item.textContent?.trim()).to.equal('Saved'); * ``` */ export declare function waitForToast(match?:ToastMatch,options?:Omit,'match'>):Promise;