import { ASTChangeDetector } from './ast-change-detector.js';
interface ComponentFile {
    path: string;
    originalCode: string;
    modifiedCode: string;
}
interface TestFile {
    path: string;
    code: string;
}
interface SelectorUpdate {
    testFile: string;
    line?: number;
    oldSelector: string;
    newSelector: string;
    selectorType: 'class' | 'css_selector' | 'css_class' | 'data_testid';
    confidence?: 'high' | 'medium' | 'low';
    reason?: string;
}
interface DynamicClassWarning {
    component: string;
    issue: string;
    suggestion: string;
}
interface AnalysisResult {
    hasUpdates: boolean;
    selectorUpdates: SelectorUpdate[];
    suggestions: string[];
    dynamicClassWarnings: DynamicClassWarning[];
}
interface ClassChange {
    oldClass: string;
    newClass: string;
    hasDataTestId: boolean;
    dataTestId?: string;
    isDynamic?: boolean;
}
interface SelectorAnalysis {
    hasChanges: boolean;
    classChanges: ClassChange[];
    suggestions: string[];
    newElements: string[];
}
interface UpdatedFile {
    filePath: string;
    changesApplied: number;
    backupCreated: boolean;
}
interface BatchUpdateResult {
    updatedFiles: UpdatedFile[];
    totalChanges: number;
}
interface FileSystemOperations {
    readFile: (path: string) => Promise<string>;
    writeFile: (path: string, content: string) => Promise<void>;
}
interface BackupStrategy {
    createBackup: (filePath: string, content: string) => Promise<string>;
    restoreBackup: (filePath: string) => Promise<void>;
}
interface TestRunner {
    runTests: (testFile: string) => Promise<{
        success: boolean;
        failures: string[];
    }>;
}
interface RollbackResult {
    success: boolean;
    rolledBack: boolean;
    reason?: string;
}
export declare class SelectorAutoUpdater {
    private changeDetector;
    private fileSystemOperations?;
    private backupStrategy?;
    private testRunner?;
    constructor(changeDetector: ASTChangeDetector);
    setFileSystemOperations(operations: FileSystemOperations): void;
    setBackupStrategy(strategy: BackupStrategy): void;
    setTestRunner(runner: TestRunner): void;
    analyzeAndUpdateSelectors({ componentFile, testFiles }: {
        componentFile: ComponentFile;
        testFiles: TestFile[];
    }): Promise<AnalysisResult>;
    analyzeSelectorChangesFromAST(astChanges: any, fileName: string): Promise<SelectorAnalysis>;
    private findSelectorUpdatesInTestFile;
    applySelectorsToTestFile(testFileContent: string, selectorUpdates: SelectorUpdate[]): Promise<string>;
    batchUpdateTestFiles(componentChanges: Record<string, {
        originalCode: string;
        modifiedCode: string;
    }>, testFiles: string[]): Promise<BatchUpdateResult>;
    createTestFileBackup(filePath: string, content: string): Promise<string>;
    updateWithRollbackProtection(testFile: string, originalContent: string, updatedContent: string): Promise<RollbackResult>;
    validateSelectorUpdates(updates: SelectorUpdate[]): Promise<void>;
    private detectDynamicClassWarnings;
    private detectFileType;
    private isPhoenixTemplate;
    private isPhoenixTestFile;
    private extractComponentName;
    private escapeRegex;
    private inferDataTestId;
}
export {};
//# sourceMappingURL=selector-auto-updater.d.ts.map