import type { AiGeneratedRooms, UsageLimits, FullUsageLimits, SimplifiedUsageLimits } from '@crystaldesign/web-planner-logic';
import { Event, Modal } from '@crystaldesign/diva-core';
import DivaWebPlanner from '@crystaldesign/web-planner-logic';
import { AiPromptItem } from '../../../../components/GlobalElements/AiRoomsSelection';
import { type LeadKeySubmitResult } from '../../../../components/GlobalElements/AiRoomsSelection/LeadKeyModal';
import DivaViewHandler from '../../../../model/DivaViewHandler';
export default class AIState {
    private divaWebPlanner?;
    private productState;
    private settingsState;
    private uiState;
    private viewHandler;
    aiSelectedStyleKey: string | undefined;
    aiStyleKeyInitializedByEvent: boolean;
    aiGeneratedRooms: {
        [roomKey: string]: {
            [hash: string]: AiGeneratedRooms;
        };
    };
    usageLimits: UsageLimits | undefined;
    favoriteAiImageKeys: {
        key: string;
        byDefault?: boolean;
    }[];
    setHash: string;
    aiRoomRenderingsSelection: AiPromptItem[];
    aiRoomRenderingsLoading: boolean;
    aiRoomRenderingsError: string | undefined;
    aiGenerationErrors: {
        [roomKey: string]: {
            [hash: string]: string | undefined;
        };
    };
    generatedImageHistory: {
        key: string;
        src: string;
        hash: string;
        customPrompt?: string;
    }[];
    currentlyVisibleRoom: {
        key: string;
        hash: string;
        src: string;
    } | undefined;
    loadingSlideFocusRequest: number;
    isLoadingSlideActive: boolean;
    selectedRoom: string;
    divaAiImageReference?: string | undefined;
    private _resolvePendingGeneration?;
    private openModal?;
    private closeModal?;
    showAiRoomRenderingInSummary: boolean;
    constructor(viewHandler: DivaViewHandler, openModal?: (data: Modal) => void, closeModal?: () => void);
    setDivaAiImageReference(val: string | undefined): void;
    initFunctions(divaWebPlanner: DivaWebPlanner, subscribeEvents?: ((fn: (event: Event) => void) => void) | undefined): void;
    private listenToAiStyleKeyEvent;
    setAiSelectedStyleKey(key: string): void;
    onEnterStyleConsultantMode(): void;
    get doAllowAI(): number | false;
    onLogicInitialized(): Promise<void>;
    loadUsageLimits(): Promise<void>;
    loadAiRoomRenderings(): Promise<void>;
    private setAiRoomRenderingsSelection;
    private setAiRoomRenderingsLoading;
    private setAiRoomRenderingsError;
    setAiGenerationError(roomKey: string, hash: string, error: string | undefined): void;
    clearAiGenerationError(roomKey: string, hash: string): void;
    triggerLeadKeyModal: () => void;
    private showLeadKeyFeedback;
    generateAiImageWithReferenceImages(selectedRoom: string, hash: string, divaAiImageReference: string, addReferenceImage?: string, addToFavorites?: boolean): Promise<any>;
    createLeadKey(email: string, firstname?: string, lastname?: string): Promise<LeadKeySubmitResult>;
    setAiGeneratedRooms(roomKey: string, hash: string, val: AiGeneratedRooms | undefined, customPrompt?: string): void;
    setFavoriteAiImageKeys(val: {
        key: string;
        byDefault?: boolean;
    }[]): void;
    addToFavorites(key: string): void;
    onFavoriteAiImageKeyChange: (key: string, byDefault?: boolean) => void;
    useAiGeneratedRoom(roomKey: string, hash: string, addToFavorites?: boolean, imageSrc?: string): void;
    setCurrentlyVisibleRoom(room: {
        key: string;
        hash: string;
        src: string;
    }): void;
    focusLoadingSlide(): void;
    setLoadingSlideActive(active: boolean): void;
    clearAiDisplayImage(): void;
    customPromptInput: string | undefined;
    setCustomPromptInput(val: string | undefined): void;
    setUsageLimits(val: UsageLimits): void;
    clearAiImageAsJpg(): void;
    catalogDataKiReady(): boolean | undefined;
    setAiImageAsJpg(promptId: string, image: string): void;
    removeAiImageFromBasket(promptId: string): void;
    setSetHash(val: string): void;
    restoreFavoriteAiRoomsFromBasket(favoriteAiRoomKeys?: string[], setImages?: any[]): void;
    get isTimeframeLimitReached(): 'daily' | 'weekly' | 'monthly' | undefined;
    /**
     * Check if only IP limit is reached (can be bypassed with lead key)
     */
    get isIpLimitOnly(): boolean;
    /**
     * Check if any violations are present
     */
    get hasViolations(): boolean;
    /**
     * Check if AI component should be shown for anonymous users
     * Returns false if organization limit is reached
     */
    get shouldShowAiForAnonymous(): boolean;
    /**
     * Check if any limit is defined in the org. if 0 the don't show the ai component
     */
    get isAnyLimitDefined(): boolean;
    /**
     * Get usage budget information (works for both anonymous and authenticated users)
     */
    get usageBudget(): {
        total: number;
        used: number;
        remaining: number;
        isLimitReached: boolean;
        leadKeyActive: boolean;
    } | null;
    handleGenerate(roomKey: string, addToFavorites?: boolean): Promise<void>;
    /**
     * Set the currently selected room for AI generation
     */
    setSelectedRoom(roomKey: string): void;
    /**
     * Check if any AI generation is currently in progress
     * Used to disable all generate buttons for anonymous users when one is running
     */
    get isAnyGenerationInProgress(): boolean;
    /**
     * Get enriched AI room renderings with callbacks and current state
     * This computed property builds the full AiPromptItem array with all interactive handlers
     */
    enrichedAiRoomRenderings(replaceImage?: boolean): AiPromptItem[];
    reset(): void;
}
export declare function isSimplifiedUsageLimits(limits: UsageLimits): limits is SimplifiedUsageLimits;
export declare function isFullUsageLimits(limits: UsageLimits): limits is FullUsageLimits;
//# sourceMappingURL=index.d.ts.map