<?xml version="1.0" encoding="UTF-8" ?>

<templates xml:space="preserve">

    <t t-name="fusion_backend_theme.Sidebar">
        <div class="o_fusion_sidebar_panel">
            <div class="o_fusion_sidebar">
                <ul class="o_fusion_sidebar_menu">
                    <t t-foreach="this.appMenuService.getAppsMenuItems()" t-as="app" t-key="app.id">
                        <li t-attf-class="nav-item {{ app.id === this.appMenuService.getCurrentApp()?.id ? 'active' : '' }}">
                            <a
                                t-att-href="app.href"
                                t-att-data-menu-id="app.id"
                                t-att-data-menu-xmlid="app.xmlid"
                                t-att-data-action-id="app.actionID"
                                t-on-click.prevent="() => this._onAppClick(app)"
                                class="nav-link"
                                role="menuitem"
                            >
                                <img
                                    t-if="app.webIconData"
                                    class="o_fusion_sidebar_icon"
                                    t-att-src="app.webIconData"
                                />
                                <img
                                    t-else=""
                                    class="o_fusion_sidebar_icon"
                                    src="/base/static/description/icon.png"
                                />
                                <span class="o_fusion_sidebar_name">
                                    <t t-out="app.label"/>
                                </span>
                            </a>
                        </li>
                    </t>
                </ul>
                <div t-if="sidebarImageUrl" class="o_fusion_sidebar_logo p-2">
                    <img class="img-fluid mx-auto" t-att-src="sidebarImageUrl" alt="Logo"/>
                </div>
            </div>
        </div>
    </t>

</templates>
