/**
 * EXAMPLE: Gamification App
 *
 * This file demonstrates the complete structure of a SynOS app.
 * Apps are self-contained modules that can be loaded from CDN.
 *
 * An app provides:
 * 1. Runtime extensions (actions, widgets, event handlers)
 * 2. Config schema (Zod validation)
 * 3. Editor component (for visual editing)
 *
 * This file would be bundled as a standalone module (ES or UMD)
 * and deployed to CDN at: {cdnBase}/apps/gamification/index.js
 */
import { z } from 'zod';
import type { NormalizedEvent } from '../../events/types';
import type { AppEventContext } from '../types';
/**
 * App config schema - defines what config this app expects.
 */
export declare const configSchema: z.ZodObject<{
    badges: z.ZodDefault<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        name: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        icon: z.ZodString;
        trigger: z.ZodObject<{
            event: z.ZodString;
            count: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            event: string;
            count?: number | undefined;
        }, {
            event: string;
            count?: number | undefined;
        }>;
    }, "strip", z.ZodTypeAny, {
        trigger: {
            event: string;
            count?: number | undefined;
        };
        id: string;
        icon: string;
        name: string;
        description?: string | undefined;
    }, {
        trigger: {
            event: string;
            count?: number | undefined;
        };
        id: string;
        icon: string;
        name: string;
        description?: string | undefined;
    }>, "many">>;
    showProgress: z.ZodDefault<z.ZodBoolean>;
    celebrationStyle: z.ZodDefault<z.ZodEnum<["confetti", "toast", "modal"]>>;
}, "strip", z.ZodTypeAny, {
    badges: {
        trigger: {
            event: string;
            count?: number | undefined;
        };
        id: string;
        icon: string;
        name: string;
        description?: string | undefined;
    }[];
    showProgress: boolean;
    celebrationStyle: "modal" | "toast" | "confetti";
}, {
    badges?: {
        trigger: {
            event: string;
            count?: number | undefined;
        };
        id: string;
        icon: string;
        name: string;
        description?: string | undefined;
    }[] | undefined;
    showProgress?: boolean | undefined;
    celebrationStyle?: "modal" | "toast" | "confetti" | undefined;
}>;
export type GamificationConfig = z.infer<typeof configSchema>;
/**
 * Action: Award a badge to the user.
 */
declare const AwardBadgeSchema: z.ZodObject<{
    kind: z.ZodLiteral<"gamification:award_badge">;
    badgeId: z.ZodString;
    showCelebration: z.ZodDefault<z.ZodBoolean>;
    label: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    kind: "gamification:award_badge";
    badgeId: string;
    showCelebration: boolean;
    label?: string | undefined;
}, {
    kind: "gamification:award_badge";
    badgeId: string;
    label?: string | undefined;
    showCelebration?: boolean | undefined;
}>;
/**
 * Action: Show the progress widget.
 */
declare const ShowProgressSchema: z.ZodObject<{
    kind: z.ZodLiteral<"gamification:show_progress">;
    slot: z.ZodDefault<z.ZodString>;
    label: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    kind: "gamification:show_progress";
    slot: string;
    label?: string | undefined;
}, {
    kind: "gamification:show_progress";
    slot?: string | undefined;
    label?: string | undefined;
}>;
/**
 * Award badge executor.
 */
declare function executeAwardBadge(action: z.infer<typeof AwardBadgeSchema>, context: any): Promise<{
    cleanup: () => void;
}>;
/**
 * Show progress executor.
 */
declare function executeShowProgress(action: z.infer<typeof ShowProgressSchema>, context: any): Promise<{
    cleanup: () => void;
}>;
/**
 * Props passed to the editor component.
 */
interface EditorPanelProps {
    config: Record<string, unknown>;
    onChange: (config: Record<string, unknown>) => void;
    editor: {
        setDirty: (dirty: boolean) => void;
        navigateHome: () => Promise<boolean>;
        save: () => Promise<void>;
        publish: (captureScreenshot?: boolean) => Promise<void>;
    };
    platformClient?: unknown;
}
/**
 * Gamification editor component.
 */
declare function GamificationEditor({ config, onChange, editor }: EditorPanelProps): import("react/jsx-runtime").JSX.Element;
/**
 * The complete app manifest.
 * This is what gets registered with the AppRegistry.
 */
export declare const manifest: {
    id: string;
    version: string;
    name: string;
    description: string;
    runtime: {
        actions: ({
            kind: string;
            schema: z.ZodObject<{
                kind: z.ZodLiteral<"gamification:award_badge">;
                badgeId: z.ZodString;
                showCelebration: z.ZodDefault<z.ZodBoolean>;
                label: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                kind: "gamification:award_badge";
                badgeId: string;
                showCelebration: boolean;
                label?: string | undefined;
            }, {
                kind: "gamification:award_badge";
                badgeId: string;
                label?: string | undefined;
                showCelebration?: boolean | undefined;
            }>;
            executor: typeof executeAwardBadge;
        } | {
            kind: string;
            schema: z.ZodObject<{
                kind: z.ZodLiteral<"gamification:show_progress">;
                slot: z.ZodDefault<z.ZodString>;
                label: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                kind: "gamification:show_progress";
                slot: string;
                label?: string | undefined;
            }, {
                kind: "gamification:show_progress";
                slot?: string | undefined;
                label?: string | undefined;
            }>;
            executor: typeof executeShowProgress;
        })[];
        widgets: ({
            id: string;
            component: {
                mount(container: HTMLElement, config?: {
                    badgeId: string;
                    icon: string;
                    name: string;
                }): () => void;
            };
            metadata: {
                name: string;
                icon: string;
            };
        } | {
            id: string;
            component: {
                mount(container: HTMLElement, config?: {
                    progress: number;
                    total: number;
                }): () => void;
            };
            metadata: {
                name: string;
                icon: string;
            };
        })[];
        events: {
            names: string[];
            handler: (event: NormalizedEvent, _ctx: AppEventContext) => void;
        }[];
    };
    configSchema: z.ZodObject<{
        badges: z.ZodDefault<z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            name: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
            icon: z.ZodString;
            trigger: z.ZodObject<{
                event: z.ZodString;
                count: z.ZodOptional<z.ZodNumber>;
            }, "strip", z.ZodTypeAny, {
                event: string;
                count?: number | undefined;
            }, {
                event: string;
                count?: number | undefined;
            }>;
        }, "strip", z.ZodTypeAny, {
            trigger: {
                event: string;
                count?: number | undefined;
            };
            id: string;
            icon: string;
            name: string;
            description?: string | undefined;
        }, {
            trigger: {
                event: string;
                count?: number | undefined;
            };
            id: string;
            icon: string;
            name: string;
            description?: string | undefined;
        }>, "many">>;
        showProgress: z.ZodDefault<z.ZodBoolean>;
        celebrationStyle: z.ZodDefault<z.ZodEnum<["confetti", "toast", "modal"]>>;
    }, "strip", z.ZodTypeAny, {
        badges: {
            trigger: {
                event: string;
                count?: number | undefined;
            };
            id: string;
            icon: string;
            name: string;
            description?: string | undefined;
        }[];
        showProgress: boolean;
        celebrationStyle: "modal" | "toast" | "confetti";
    }, {
        badges?: {
            trigger: {
                event: string;
                count?: number | undefined;
            };
            id: string;
            icon: string;
            name: string;
            description?: string | undefined;
        }[] | undefined;
        showProgress?: boolean | undefined;
        celebrationStyle?: "modal" | "toast" | "confetti" | undefined;
    }>;
    editor: {
        component: typeof GamificationEditor;
        panel: {
            title: string;
            icon: string;
            description: string;
        };
    };
    metadata: {
        author: string;
        tags: string[];
    };
};
export default manifest;
