<.topbar subject={@subject} />

<.sidebar>
  <.sidebar_item
    current_path={@current_path}
    navigate={~p"/#{@account}/sites"}
    icon="hero-globe-alt"
  >
    Sites
  </.sidebar_item>

  <.sidebar_item
    current_path={@current_path}
    navigate={~p"/#{@account}/actors"}
    icon="hero-user-solid"
  >
    Actors
  </.sidebar_item>

  <.sidebar_item
    current_path={@current_path}
    navigate={~p"/#{@account}/groups"}
    icon="hero-user-group-solid"
  >
    Groups
  </.sidebar_item>

  <.sidebar_item
    current_path={@current_path}
    navigate={~p"/#{@account}/clients"}
    icon="hero-device-phone-mobile-solid"
  >
    Clients
  </.sidebar_item>

  <.sidebar_item
    current_path={@current_path}
    navigate={~p"/#{@account}/policies"}
    icon="hero-shield-check-solid"
  >
    Policies
  </.sidebar_item>

  <.sidebar_item
    :if={Domain.Config.self_hosted_relays_enabled?()}
    current_path={@current_path}
    navigate={~p"/#{@account}/relay_groups"}
    icon="hero-arrows-right-left"
  >
    Relays
  </.sidebar_item>

  <.sidebar_item_group current_path={@current_path} id="settings" icon="hero-cog-solid">
    <:name>Settings</:name>

    <:item navigate={~p"/#{@account}/settings/account"}>Account</:item>
    <:item navigate={~p"/#{@account}/settings/identity_providers"}>
      Identity Providers
    </:item>
    <:item navigate={~p"/#{@account}/settings/dns"}>DNS</:item>
  </.sidebar_item_group>

  <:bottom>
    <div class="absolute bottom-0 left-0 justify-left p-4 space-x-4 w-full lg:flex bg-white z-20">
      <.link target="_blank" href="https://firezone.statuspage.io">
        <.badge>
          Platform status
        </.badge>
      </.link>
    </div>
  </:bottom>
</.sidebar>

<main class="md:ml-64 h-auto pt-14">
  <%= @inner_content %>
</main>
