#!/usr/bin/env python3
"""Validation script for main refactoring."""

import sys
import os

# Add parent directory to path to import utils
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))

from utils.validation_common import (
    validate_jsx_component,
    count_complexity,
    print_validation_header,
    print_complexity_analysis,
    print_summary_footer,
    run_validation,
)

def main():
    """Validate main refactoring."""
    # Components to validate
    components = {
        'TicketsPanelRefactored.jsx': ['TicketsPanelRefactored'],
        'TicketFilters.jsx': ['TicketFilters'],
        'BulkOperations.jsx': ['BulkOperations'],
        'TicketList.jsx': ['TicketList'],
        'TicketStats.jsx': ['TicketStats']
    }
    
    base_path = 'src/proxym/dashboard/components/tickets'
    original_file = 'src/proxym/dashboard/components/tickets.jsx'
    
    benefits_text = """  ✅ Separated ticket management into focused components
  ✅ Improved reusability of ticket logic
  ✅ Enhanced testability with isolated components
  ✅ Better maintainability through modular design"""
    
    return run_validation(
        title="Main Refactoring",
        components=components,
        base_path=base_path,
        original_file=original_file,
        benefits_text=benefits_text
    )

if __name__ == "__main__":
    main()
