/**
 * BaseDiagramPlugin - Abstract base class for diagram plugins
 *
 * Provides common functionality and contract for all diagram plugins
 */
/**
 * Abstract base class for diagram plugins
 */
export class BaseDiagramPlugin {
    /**
     * Validate AST - default implementation (can be overridden)
     */
    validate(ast) {
        const errors = [];
        const warnings = [];
        // Basic validation
        if (!ast.components || ast.components.length === 0) {
            errors.push('No components found in AST');
        }
        return {
            valid: errors.length === 0,
            errors,
            warnings
        };
    }
    /**
     * Get default options - can be overridden by subclasses
     */
    getDefaultOptions() {
        return {
            includeAttributes: true,
            includeRelationships: true,
            includeLifecycles: true,
            includeBehaviors: true
        };
    }
    /**
     * Helper: Check if diagram type is supported
     */
    isTypeSupported(type) {
        return this.supportedTypes.includes(type);
    }
    /**
     * Helper: Validate diagram type
     */
    validateType(type) {
        if (!this.isTypeSupported(type)) {
            throw new Error(`Plugin ${this.name} does not support diagram type: ${type}`);
        }
    }
    /**
     * Helper: Create empty diagram structure
     */
    createEmptyDiagram(type, direction) {
        return {
            type,
            direction: direction || 'TD',
            nodes: [],
            edges: [],
            subgraphs: []
        };
    }
}
//# sourceMappingURL=BaseDiagramPlugin.js.map