<%= @container.name %>
<%= if @container.desc do %>
<%= gettext("Description:") %>
<%= @container.desc %>
<% end %>
<%= gettext("Type:") %>
<%= @container.type %>
<%= if @container.location do %>
<%= gettext("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:
dgettext("prompts", "Are you sure you want to delete %{name}?", name: @container.name)
] do %>
<% end %>
<%= if @container.ammo_groups |> Enum.empty?() do %>
<%= gettext("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 %>