<% if resource.errors.any? %>
  <div id="error_explanation" class="alert alert-error mb-4" data-turbo-cache="false">
    <%= icon 'circle-x' %>
    <div class="font-bold mb-4 flex items-center gap-2">
      <div>
        <h3 class="font-bold">
          <%= I18n.t("errors.messages.not_saved",
                     count: resource.errors.count,
                     resource: resource.class.model_name.human.downcase)
           %>
        </h3>
        <ul class="text-sm mt-1">
          <% resource.errors.full_messages.each do |message| %>
            <li><%= message %></li>
          <% end %>
        </ul>
      </div>
    </div>
  </div>
<% end %>
