<%= gettext("Ammo Types") %>

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

<%= gettext("No Ammo Types") %> <%= display_emoji("😔") %>

<%= live_patch(dgettext("actions", "Add your first type!"), to: Routes.ammo_type_index_path(Endpoint, :new), class: "btn btn-primary" ) %> <% else %> <%= live_patch(dgettext("actions", "New Ammo type"), to: Routes.ammo_type_index_path(Endpoint, :new), class: "btn btn-primary" ) %> <.live_component module={CanneryWeb.Components.TableComponent} id="ammo_types_index_table" action={@live_action} columns={@columns} rows={@rows} /> <% end %>
<%= if @live_action in [:new, :edit] do %> <.modal return_to={Routes.ammo_type_index_path(Endpoint, :index)}> <.live_component module={CanneryWeb.AmmoTypeLive.FormComponent} id={@ammo_type.id || :new} title={@page_title} action={@live_action} ammo_type={@ammo_type} return_to={Routes.ammo_type_index_path(Endpoint, :index)} current_user={@current_user} } /> <% end %>