import { AppNodeType, AppNodeData } from '../../types/node';
import { Edge } from '@xyflow/react';

export interface ExecutionContext {
    nodeId: string;
    nodes: AppNodeType[];
    edges: Edge[];
    projectId?: string;
    prompt: string;
    upstreamTexts: string[];
    inputs: AppNodeType[];
    
    // Node state
    node: AppNodeType;
    
    // Actions/Hooks
    updateNodeData: (id: string, data: Partial<AppNodeData>) => void;
    setNodes: (updater: (nds: AppNodeType[]) => AppNodeType[]) => void;
    setEdges: (updater: (eds: Edge[]) => Edge[]) => void;
    addHistoryItem: (item: any) => void;
    
    // Model Helpers
    getLLMModelDefault: () => string;
    getImageModelDefault: () => string;
    getVideoModelDefault: () => string;
    getAudioModelDefault: () => string;
    getMusicModelDefault: () => string;
}

export interface NodeExecutionStrategy {
    execute(context: ExecutionContext): Promise<void>;
}
