<!DOCTYPE html>
<html lang="en" class="[scrollbar-gutter:stable]">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="csrf-token" content={get_csrf_token()} />
    <.live_title default="BookSocial" suffix="">
      {assigns[:page_title]}
    </.live_title>
    <link phx-track-static rel="stylesheet" href={~p"/assets/app.css"} />
    <script defer phx-track-static type="text/javascript" src={~p"/assets/app.js"} />
  </head>
  <body class="bg-white">
    <nav class="py-2">
      <ul class="w-full flex items-center gap-4 px-4 sm:px-6 lg:px-8 justify-end font-semibold text-sm text-zinc-900">
        <li class="">
          <.link href={~p"/"} class="hover:text-zinc-600">
            Home
          </.link>
        </li>
        <li class="grow"></li>
        <%= if @current_user do %>
          <li class="">
            {@current_user.email}
          </li>
          <li>
            <.link href={~p"/account/settings"} class="hover:text-zinc-600">
              Settings
            </.link>
          </li>
        <% else %>
          <li>
            <.link href={~p"/account/log_in"} class="hover:text-zinc-600">
              Log in
            </.link>
          </li>
          <li>
            <.link href={~p"/account/register"} class="hover:text-zinc-600">
              Sign up
            </.link>
          </li>
        <% end %>
      </ul>
    </nav>
    {@inner_content}
  </body>
</html>
