{{page-title "Admin"}}

<EmberWormhole @to="sidebar-menu-items">
    <Layout::Sidebar::Item @route="console.admin.index" @icon="rectangle-list">{{t "console.admin.menu.overview"}}</Layout::Sidebar::Item>
    <Layout::Sidebar::Item @route="console.admin.organizations" @icon="building">{{t "console.admin.menu.organizations"}}</Layout::Sidebar::Item>
    <Layout::Sidebar::Item @route="console.admin.branding" @icon="palette">{{t "console.admin.menu.branding"}}</Layout::Sidebar::Item>
    <Layout::Sidebar::Item @route="console.admin.two-fa-settings" @icon="shield-halved">{{t "console.admin.menu.2fa-config"}}</Layout::Sidebar::Item>
    <Layout::Sidebar::Item @route="console.admin.schedule-monitor" @icon="calendar-check">{{t "console.admin.schedule-monitor.schedule-monitor"}}</Layout::Sidebar::Item>
    
    {{#each this.menuService.adminMenuItems as |menuItem|}}
        <Layout::Sidebar::Item
            @onClick={{fn this.universe.transitionMenuItem "console.admin.virtual" menuItem}}
            @item={{menuItem}}
            @icon={{menuItem.icon}}
        >{{menuItem.title}}</Layout::Sidebar::Item>
    {{/each}}

    {{#each this.menuService.adminMenuPanels as |menuPanel|}}
        <Layout::Sidebar::Panel @open={{menuPanel.open}} @title={{menuPanel.title}}>
            {{#each menuPanel.items as |menuItem|}}
                <Layout::Sidebar::Item
                    @onClick={{fn this.universe.transitionMenuItem "console.admin.virtual" menuItem}}
                    @item={{menuItem}}
                    @icon={{menuItem.icon}}
                >{{menuItem.title}}</Layout::Sidebar::Item>
            {{/each}}
        </Layout::Sidebar::Panel>
    {{/each}}
    <Layout::Sidebar::Panel @open={{true}} @title="System Config">
        <Layout::Sidebar::Item @route="console.admin.config.services" @icon="bell-concierge">{{t "console.admin.menu.services"}}</Layout::Sidebar::Item>
        <Layout::Sidebar::Item @route="console.admin.config.mail" @icon="envelope">{{t "console.admin.menu.mail"}}</Layout::Sidebar::Item>
        <Layout::Sidebar::Item @route="console.admin.config.filesystem" @icon="hard-drive">{{t "console.admin.menu.filesystem"}}</Layout::Sidebar::Item>
        <Layout::Sidebar::Item @route="console.admin.config.queue" @icon="layer-group">{{t "console.admin.menu.queue"}}</Layout::Sidebar::Item>
        <Layout::Sidebar::Item @route="console.admin.config.socket" @icon="plug">{{t "console.admin.menu.socket"}}</Layout::Sidebar::Item>
        <Layout::Sidebar::Item @route="console.admin.config.notification-channels" @icon="tower-broadcast">{{t "console.admin.menu.push-notifications"}}</Layout::Sidebar::Item>
    </Layout::Sidebar::Panel>
</EmberWormhole>

<Layout::Section::Container>
    {{outlet}}
</Layout::Section::Container>