/**
 * @license
 * Copyright 2025 Vybestack LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import { HistoryItem } from '../types.js';
export type AppAction = {
    type: 'ADD_ITEM';
    payload: {
        itemData: Omit<HistoryItem, 'id'>;
        baseTimestamp: number;
    };
} | {
    type: 'OPEN_DIALOG';
    payload: 'theme' | 'auth' | 'editor' | 'providerModel' | 'provider' | 'privacy' | 'loadProfile' | 'tools' | 'oauthCode';
} | {
    type: 'CLOSE_DIALOG';
    payload: 'theme' | 'auth' | 'editor' | 'providerModel' | 'provider' | 'privacy' | 'loadProfile' | 'tools' | 'oauthCode';
} | {
    type: 'SET_WARNING';
    payload: {
        key: string;
        message: string;
    };
} | {
    type: 'CLEAR_WARNING';
    payload: string;
} | {
    type: 'SET_THEME_ERROR';
    payload: string | null;
} | {
    type: 'SET_AUTH_ERROR';
    payload: string | null;
} | {
    type: 'SET_EDITOR_ERROR';
    payload: string | null;
};
export interface AppState {
    openDialogs: {
        theme: boolean;
        auth: boolean;
        editor: boolean;
        providerModel: boolean;
        provider: boolean;
        privacy: boolean;
        loadProfile: boolean;
        tools: boolean;
        oauthCode: boolean;
    };
    warnings: Map<string, string>;
    errors: {
        theme: string | null;
        auth: string | null;
        editor: string | null;
    };
    lastAddItemAction: {
        itemData: Omit<HistoryItem, 'id'>;
        baseTimestamp: number;
    } | null;
}
export declare const initialAppState: AppState;
export declare function appReducer(state: AppState, action: AppAction): AppState;
