with open("app/shared/frontend/base.html", "r") as f:
    content = f.read()

old_chips = """        <div id="bbCountLine" class="bb-count-line" role="status" aria-live="polite">
            <button class="bb-chip" type="button" data-bb-key="timer"><i class="bi bi-clock-history"></i> <span class="bb-chip-text">Timer: 0</span></button>
            <button class="bb-chip" type="button" data-bb-key="calls"><i class="bi bi-telephone"></i> <span class="bb-chip-text">Opkald: 0</span></button>
            <button class="bb-chip" type="button" data-bb-key="mail"><i class="bi bi-envelope"></i> <span class="bb-chip-text">Mail: 0</span></button>
            <button class="bb-chip" type="button" data-bb-key="alerts"><i class="bi bi-exclamation-triangle"></i> <span class="bb-chip-text">Alerts: 0</span></button>
            <button class="bb-chip" type="button" data-bb-key="reminders"><i class="bi bi-bell"></i> <span class="bb-chip-text">Reminders: 0</span></button>
        </div>"""
new_chips = """        <div id="bbCountLine" class="bb-count-line" role="status" aria-live="polite">
            <button class="bb-chip" type="button" data-bb-key="mail"><i class="bi bi-envelope"></i> <span class="bb-chip-text">Mails: 0</span></button>
            <button class="bb-chip" type="button" data-bb-key="cases"><i class="bi bi-folder2-open"></i> <span class="bb-chip-text">Sager: 0</span></button>
            <button class="bb-chip" type="button" data-bb-key="urgent"><i class="bi bi-exclamation-octagon"></i> <span class="bb-chip-text">Hastesager: 0</span></button>
            <button class="bb-chip" type="button" data-bb-key="timer"><i class="bi bi-stopwatch"></i> <span class="bb-chip-text">Timere: 0</span></button>
            <button class="bb-chip" type="button" data-bb-key="kuma"><i class="bi bi-activity"></i> <span class="bb-chip-text">Kuma: 0</span></button>
            <button class="bb-chip" type="button" data-bb-key="eset"><i class="bi bi-shield-lock"></i> <span class="bb-chip-text">ESET: 0</span></button>
        </div>"""
content = content.replace(old_chips, new_chips)

old_tabs = """            <div class="bb-side-tabs" role="tablist" aria-label="Bundbar kategorier">
                <button class="bb-tab-btn is-active" type="button" data-bb-tab="timer" role="tab" aria-selected="true"><i class="bi bi-clock-history"></i> Timer</button>
                <button class="bb-tab-btn" type="button" data-bb-tab="calls" role="tab" aria-selected="false"><i class="bi bi-telephone"></i> Opkald</button>
                <button class="bb-tab-btn" type="button" data-bb-tab="mail" role="tab" aria-selected="false"><i class="bi bi-envelope"></i> Mail</button>
                <button class="bb-tab-btn" type="button" data-bb-tab="alerts" role="tab" aria-selected="false"><i class="bi bi-exclamation-triangle"></i> Alerts</button>
                <button class="bb-tab-btn" type="button" data-bb-tab="reminders" role="tab" aria-selected="false"><i class="bi bi-bell"></i> Reminders</button>
            </div>
            <div class="bb-tab-content" role="tabpanel" aria-live="polite">
                <div id="bbTabTitle" class="bb-tab-title"><i class="bi bi-clock-history me-1 text-accent"></i> <span class="bb-tab-title-text">Timer</span></div>
                <ul id="bbTabList" class="bb-tab-list">
                    <li>Venter på data...</li>
                </ul>
            </div>"""
new_tabs = """            <div class="bb-side-tabs" role="tablist" aria-label="Bundbar kategorier">
                <button class="bb-tab-btn is-active" type="button" data-bb-tab="overview" role="tab" aria-selected="true"><i class="bi bi-bell"></i> Overblik</button>
                <button class="bb-tab-btn" type="button" data-bb-tab="timer" role="tab" aria-selected="false"><i class="bi bi-stopwatch"></i> Timer</button>
                <button class="bb-tab-btn" type="button" data-bb-tab="messages" role="tab" aria-selected="false"><i class="bi bi-chat-dots"></i> Beskeder</button>
                <button class="bb-tab-btn" type="button" data-bb-tab="tasks" role="tab" aria-selected="false"><i class="bi bi-calendar-check"></i> Opgaver</button>
                <!-- Vises kun for chefer, men her i markup -->
                <button class="bb-tab-btn" type="button" data-bb-tab="boss" role="tab" aria-selected="false"><i class="bi bi-person-workspace"></i> Chef</button>
            </div>
            <div class="bb-tab-content" role="tabpanel" aria-live="polite">
                <div id="bbTabTitle" class="bb-tab-title"><i class="bi bi-bell me-1 text-accent"></i> <span class="bb-tab-title-text">Overblik</span></div>
                <div id="bbTabInnerContent">
                    <ul id="bbTabList" class="bb-tab-list">
                        <li>Venter på data...</li>
                    </ul>
                </div>
            </div>"""
content = content.replace(old_tabs, new_tabs)

with open("app/shared/frontend/base.html", "w") as f:
    f.write(content)
