<%= @title %>

<%= for tag <- @container.tags do %> <%= link to: "#", class: "mx-2 my-1 px-4 py-2 rounded-lg title text-xl", style: "color: #{tag.text_color}; background-color: #{tag.bg_color}", phx_click: "delete", phx_value_tag_id: tag.id, phx_target: @myself, data: [ confirm: dgettext( "prompts", "Are you sure you want to remove the %{tag_name} tag from %{container_name}?", tag_name: tag.name, container_name: @container.name ) ] do %> <%= tag.name %> <% end %> <% end %> <%= if @container.tags |> Enum.empty?() do %>

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

<% end %>
<%= unless tag_options(@tags, @container) |> Enum.empty?() do %>
<.form let={f} for={:tag} id="add-tag-to-container-form" class="flex flex-col sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center" phx-target={@myself} phx-submit="save" > <%= select(f, :tag_id, tag_options(@tags, @container), class: "text-center col-span-2 input input-primary") %> <%= error_tag(f, :tag_id, "col-span-3 text-center") %> <%= submit(dgettext("actions", "Add"), class: "mx-auto btn btn-primary", phx_disable_with: dgettext("prompts", "Adding...") ) %> <% end %>