import os
import re

for root, dirs, files in os.walk('src/app'):
    for file in files:
        if file.endswith('.tsx') or file.endswith('.ts'):
            filepath = os.path.join(root, file)
            with open(filepath, 'r') as f:
                content = f.read()
            
            # Remove any class starting with dark:
            new_content = re.sub(r'\bdark:[a-zA-Z0-9\-\/]+\s*', '', content)
            
            # Clean up empty classNames or double spaces
            new_content = new_content.replace('  ', ' ')
            new_content = new_content.replace('className=" "', 'className=""')
            
            if new_content != content:
                with open(filepath, 'w') as f:
                    f.write(new_content)
                print(f"Stripped dark classes from {filepath}")
