use-vibes
Version:
Transform any DOM element into an AI-powered micro-app
17 lines (16 loc) • 576 B
TypeScript
import type { ImageDocument } from '../../hooks/image-gen/types';
/**
* Possible display modes for the ImgGen component
*/
export type ImgGenMode = 'placeholder' | 'uploadWaiting' | 'generating' | 'display' | 'error';
/**
* Pure function to determine the current mode of the ImgGen component
* based on available document data and component state
*/
export declare function getImgGenMode({ document, prompt, loading, error, debug, }: {
document: ImageDocument | null;
prompt?: string;
loading: boolean;
error?: Error;
debug?: boolean;
}): ImgGenMode;