import re

with open("resources/js/components/AdminDashboard.tsx", "r", encoding="utf-8") as f:
    lines = f.readlines()

new_lines = []
skip = False
for i, l in enumerate(lines):
    if skip:
        if "heroImage:" in l or "});" in l or "heroSubtitle:" in l:
            if "});" in l: skip = False
        else:
            skip = False
        continue
    if "setHeroForm({" in l:
        skip = True
        continue
    if "setHeroForm" in l:
        continue
    
    new_lines.append(l)

with open("resources/js/components/AdminDashboard.tsx", "w", encoding="utf-8") as f:
    f.writelines(new_lines)
