import type { JSX } from "@solidjs/web"; import { type Accessor } from "solid-js"; import type { ImageLoadingStatus } from "./avatar-root-context.js"; export type { ImageLoadingStatus }; /** * Public api returned by {@link createAvatar}. Exposes the live * image-loading status and the setter that `` calls from its * `load` / `error` handlers. */ export interface AvatarApi { /** Reactive accessor for the image-loading status. */ imageLoadingStatus: Accessor; /** Setter — called from image load/error handlers. */ setImageLoadingStatus: (next: ImageLoadingStatus) => void; /** Whether the fallback should render (`status !== "loaded"`). */ showFallback: Accessor; /** Whether the image is fully loaded. */ isLoaded: Accessor; /** Context provider — pair with {@link useAvatar}. */ Provider: (props: { children: JSX.Element; }) => JSX.Element; } /** * Read the nearest {@link AvatarApi} provided by `c.Provider`. Throws if * called outside a Provider. */ export declare function useAvatar(): AvatarApi; /** * Solid-native headless avatar primitive. Owns the `imageLoadingStatus` * signal that consumers (or ``) write into from their * `load`/`error` handlers; exposes derived `showFallback` / `isLoaded` * accessors for the typical avatar UI flow. */ export declare function createAvatar(): AvatarApi; //# sourceMappingURL=create-avatar.d.ts.map