<nav class="
  flex flex-col
  bg-gray-15
  p-4
  w-full
" data-controller="<%= stimulus_id %>" data-<%= stimulus_id %>-cookie-value="solidus_admin">
  <%= link_to spree.admin_path, class: "py-3 px-2 text-left flex mb-4" do %>
    <%= image_tag @logo_path, alt: t('.visit_store'), class: "max-h-7" %>
  <% end %>

  <%= link_to @store_url, target: :_blank, class: "flex mb-4 px-2 py-1.5 border border-gray-100 rounded-sm shadow-sm" do %>
    <div class="flex-grow flex flex-col gap-0.5">
      <p class="font-semibold text-sm text-black"><%= @store.name %></p>
      <p class="font-normal text-xs text-gray-500"><%= @store.url %></p>
    </div>
    <%= render component("ui/icon").new(name: 'arrow-right-up-line', class: 'w-4 h-4 fill-gray-400') %>
  <% end %>

  <ul class="flex flex-col gap-0.5">
    <%= render component("layout/navigation/item").with_collection(items, fullpath: request.fullpath) %>
  </ul>

  <div class="mt-auto">
    <div class="group mb-3">
      <label class="flex gap-3 items-center py-0.5 px-3 pb-0.5 rounded hover:text-red-500 hover:bg-gray-50 font-semibold text-sm text-black cursor-pointer">
        <%= t('spree.navigation.switch_to_legacy') %>
        <div class="flex items-center">
          <%= render component("ui/forms/switch").new(size: :s, checked: false, 'data-action': "#{stimulus_id}#setCookie:prevent") %>
        </div>
      </label>
    </div>
    <%= render component("layout/navigation/account").new(
      user_label: helpers.current_solidus_admin_user.email,
      account_path: solidus_admin.account_path,
      logout_path: helpers.solidus_admin_logout_path,
      logout_method: helpers.solidus_admin_logout_method,
    ) %>
  </div>
</nav>
