<% if Avo.plugin_manager.installed?("avo-menu") && Avo.has_profile_menu? %>
<% Avo.profile_menu.items.each do |item| %>
<% if item.is_a? Avo::Menu::Link %>
<%= render Avo::ProfileItemComponent.new label: item.name, path: item.path, icon: item.icon, method: item.method, params: item.params %>
<% end %>
<% end %>
<% end %>
<%= render "avo/partials/profile_menu_extra" %>
<% if can_destroy_user? %>
<%= form_with url: helpers.main_app.send(destroy_user_session_path),
method: :delete,
data: {
controller: :"sign-out",
sign_out_confirm_value: t('avo.are_you_sure'),
action: "submit->sign-out#handle",
},
class: 'flex-1' do |form| %>
<%= form.button turbo_confirm: t('avo.are_you_sure'), class: "flex-1 flex items-center justify-center bg-white text-left cursor-pointer text-red-600 font-semibold hover:bg-red-100 block px-4 py-1 w-full py-3 text-center rounded w-full" do %>
<%= helpers.svg 'logout', class: 'h-4 mr-1' %> <%= t('avo.sign_out') %>
<% end %>
<% end %>
<% end %>