<%= gettext("Tags") %>

<%= gettext("Tags can be added to your containers to help you organize") %>

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

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

<%= live_patch(dgettext("actions", "Make your first tag!"), to: Routes.tag_index_path(Endpoint, :new), class: "btn btn-primary" ) %> <% else %> <%= live_patch(dgettext("actions", "New Tag"), to: Routes.tag_index_path(Endpoint, :new), class: "btn btn-primary" ) %> <% end %>
<%= for tag <- @tags do %> <.tag_card tag={tag}> <%= live_patch to: Routes.tag_index_path(Endpoint, :edit, tag), class: "text-primary-600 link", data: [qa: "edit-#{tag.id}"] do %> <% end %> <%= link to: "#", class: "text-primary-600 link", phx_click: "delete", phx_value_id: tag.id, data: [ confirm: dgettext("prompts", "Are you sure you want to delete %{name}?", name: tag.name), qa: "delete-#{tag.id}" ] do %> <% end %> <% end %>
<%= if @live_action in [:new, :edit] do %> <.modal return_to={Routes.tag_index_path(Endpoint, :index)}> <.live_component module={CanneryWeb.TagLive.FormComponent} id={@tag.id || :new} title={@page_title} action={@live_action} tag={@tag} return_to={Routes.tag_index_path(Endpoint, :index)} current_user={@current_user} /> <% end %>