<%= @container.name %>

<%= if @container.desc do %> <%= gettext("Description:") %> <%= @container.desc %> <% end %> <%= gettext("Type:") %> <%= @container.type %> <%= if @container.location do %> <%= gettext("Location:") %> <%= @container.location %> <% end %> <%= unless @container.ammo_groups |> Enum.empty?() do %> <%= gettext("Packs:") %> <%= @container |> Containers.get_container_ammo_group_count!() %> <%= gettext("Rounds:") %> <%= @container |> Containers.get_container_rounds!() %> <% end %>
<%= live_patch to: Routes.container_show_path(Endpoint, :edit, @container), class: "text-primary-600 link", data: [qa: "edit"] do %> <% end %> <%= link to: "#", class: "text-primary-600 link", phx_click: "delete_container", data: [ confirm: dgettext("prompts", "Are you sure you want to delete %{name}?", name: @container.name), qa: "delete" ] do %> <% end %>

<%= if @container.tags |> Enum.empty?() do %>

<%= gettext("No tags for this container") %> <%= display_emoji("😔") %>

<%= live_patch(dgettext("actions", "Why not add one?"), to: Routes.container_show_path(Endpoint, :edit_tags, @container), class: "btn btn-primary" ) %>
<% else %>
<%= for tag <- @container.tags do %> <.simple_tag_card tag={tag} /> <% end %>
<%= live_patch to: Routes.container_show_path(Endpoint, :edit_tags, @container), class: "text-primary-600 link" do %> <% end %>
<% end %>
<%= if @container.ammo_groups |> Enum.empty?() do %>

<%= gettext("No ammo 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 %> <.modal return_to={Routes.container_show_path(Endpoint, :show, @container)}> <.live_component module={CanneryWeb.ContainerLive.FormComponent} id={@container.id} title={@page_title} action={@live_action} container={@container} return_to={Routes.container_show_path(Endpoint, :show, @container)} current_user={@current_user} /> <% end %> <%= if @live_action == :edit_tags do %> <.modal return_to={Routes.container_show_path(Endpoint, :show, @container)}> <.live_component module={CanneryWeb.ContainerLive.EditTagsComponent} id={@container.id} title={@page_title} action={@live_action} container={@container} return_to={Routes.container_show_path(Endpoint, :show, @container)} current_user={@current_user} /> <% end %>