<DiscourseRoot>
  <a href="#main-container" id="skip-link">{{i18n "skip_to_main_content"}}</a>
  <DDocument />
  <PluginOutlet
    @name="above-site-header"
    @connectorTagName="div"
    @outletArgs={{hash currentPath=this.router._router.currentPath}}
  />

  {{#if this.showSiteHeader}}
    <SiteHeader
      @canSignUp={{this.canSignUp}}
      @showCreateAccount={{route-action "showCreateAccount"}}
      @showLogin={{route-action "showLogin"}}
      @showKeyboard={{route-action "showKeyboardShortcutsHelp"}}
      @toggleMobileView={{route-action "toggleMobileView"}}
      @toggleAnonymous={{route-action "toggleAnonymous"}}
      @logout={{route-action "logout"}}
      @sidebarEnabled={{this.sidebarEnabled}}
      @showSidebar={{this.showSidebar}}
      @toggleSidebar={{action "toggleSidebar"}}
    />
  {{/if}}

  <SoftwareUpdatePrompt />

  <PluginOutlet
    @name="below-site-header"
    @connectorTagName="div"
    @outletArgs={{hash currentPath=this.router._router.currentPath}}
  />

  <div id="main-outlet-wrapper" class="wrap" role="main">

    <div class="sidebar-wrapper">
      {{! empty div allows for animation }}
      {{#if (and this.sidebarEnabled this.showSidebar)}}
        <Sidebar @toggleSidebar={{action "toggleSidebar"}} />
      {{/if}}
    </div>

    <div id="main-outlet">
      <PluginOutlet @name="above-main-container" @connectorTagName="div" />
      <div class="container" id="main-container">
        {{#if this.showTop}}
          <CustomHtml @name="top" />
        {{/if}}
        <NotificationConsentBanner />
        <PwaInstallBanner />
        {{#if this.showBootstrapModeNotice}}
          <BootstrapModeNotice />
        {{/if}}
        <GlobalNotice />
        <CreateTopicsNotice />
        <PluginOutlet
          @name="top-notices"
          @connectorTagName="div"
          @outletArgs={{hash currentPath=this.router._router.currentPath}}
        />
      </div>

      {{outlet}}
      {{outlet "user-card"}}
    </div>
  </div>

  <PluginOutlet
    @name="above-footer"
    @connectorTagName="div"
    @outletArgs={{hash showFooter=this.showFooter}}
  />
  {{#if this.showFooter}}
    <CustomHtml
      @name="footer"
      @triggerAppEvent="true"
      @classNames="custom-footer-content"
    />
  {{/if}}
  <PluginOutlet
    @name="below-footer"
    @connectorTagName="div"
    @outletArgs={{hash showFooter=this.showFooter}}
  />

  {{outlet "modal"}}
  <DialogHolder />
  <TopicEntrance />
  {{outlet "composer"}}

  {{#if this.showFooterNav}}
    <FooterNav />
  {{/if}}
</DiscourseRoot>