import { ProjectConfig } from "./index";
/**
 * MEGA CONTEXT (The Source of Truth)
 *
 * This interface represents the 100% complete state required to
 * deterministically scaffold a Next.js + InstantDB project.
 *
 * "Deterministic" means:
 * - No AI guessing during scaffold.
 * - All routes, components, and data points are known.
 * - If a field is missing, the TUI must prompt for it BEFORE generation.
 */
export interface MegaContext {
    project: ProjectConfig & {
        framework: "nextjs";
        backend: "instantdb";
        styling: "tailwind-shadcn";
    };
    topLevelDesign: {
        theme: "light" | "dark" | "system";
        colors: {
            primary: string;
            secondary: string;
            accent: string;
            background: string;
            foreground: string;
        };
        fonts: {
            heading: string;
            body: string;
        };
        radius: number;
    };
    auth: {
        provider: "instantdb" | "clerk" | "kinde" | "next-auth";
        userModel: {
            fields: Record<string, string>;
        };
        roles: RoleDefinition[];
        permissions: PermissionRule[];
    };
    database: {
        entities: Record<string, EntityDefinition>;
        relationships: RelationshipDefinition[];
    };
    routing: {
        routes: Record<string, RouteNode>;
    };
    globalState: {
        stores: StoreDefinition[];
    };
}
export interface RoleDefinition {
    name: string;
    description: string;
    extends?: string;
}
export interface PermissionRule {
    role: string;
    resource: string;
    action: "create" | "read" | "update" | "delete" | "manage";
    condition?: string;
}
export interface EntityDefinition {
    name: string;
    fields: Record<string, {
        type: "string" | "number" | "boolean" | "json" | "date" | "ref";
        required: boolean;
        unique?: boolean;
        indexed?: boolean;
    }>;
}
export interface RelationshipDefinition {
    from: string;
    to: string;
    type: "one-to-one" | "one-to-many" | "many-to-many";
    inverseName: string;
}
export interface RouteNode {
    path: string;
    type: "page" | "layout" | "group";
    isProtected: boolean;
    allowedRoles?: string[];
    ui?: {
        title: string;
        description: string;
        layout?: "default" | "dashboard" | "auth";
        components: ComponentUsage[];
    };
    data?: {
        queries: DataQuery[];
        mutations: DataMutation[];
    };
}
export interface ComponentUsage {
    name: string;
    type: "shadcn" | "custom";
    props?: Record<string, any>;
    children?: ComponentUsage[];
}
export interface DataQuery {
    name: string;
    entity: string;
    source: "server-component" | "client-hook";
    filter?: Record<string, any>;
}
export interface DataMutation {
    name: string;
    description: string;
    args: Record<string, string>;
    inputEntity?: string;
}
export interface StoreDefinition {
    name: string;
    state: Record<string, string>;
    actions: string[];
}
//# sourceMappingURL=mega-context.d.ts.map