<%= @container.name %>
<%= if @container.desc do %>
Description: <%= @container.desc %>
<% end %>
Type: <%= @container.type %>
<%= if @container.location do %>
Location: <%= @container.location %>
<% end %>
<%= live_patch to: Routes.container_show_path(@socket, :edit, @container),
class: "text-primary-500 link" do %>
<% end %>
<%= link to: "#",
class: "text-primary-500 link",
phx_click: "delete",
data: [confirm: "Are you sure you want to delete #{@container.name}?"] do %>
<% end %>
<%= if @container.ammo_groups |> Enum.empty?() do %>
No ammo groups in this container
<% else %>
<%= for ammo_group <- @container.ammo_groups do %>
<.ammo_group_card ammo_group={ammo_group} />
<% end %>
<% end %>
<%= if @live_action in [:edit] do %>
<%= live_modal(CanneryWeb.ContainerLive.FormComponent,
id: @container.id,
title: @page_title,
action: @live_action,
container: @container,
return_to: Routes.container_show_path(@socket, :show, @container)
) %>
<% end %>