<%= turbo_frame_tag dom_id(@chat, :title), class: "block" do %>
  <% bg_class = params[:ctx] == "chat" ? "bg-white" : "bg-container-inset" %>
  <%= styled_form_with model: @chat,
                       class: class_names("p-1 rounded-md font-medium text-primary w-full", bg_class),
                       data: { controller: "auto-submit-form", auto_submit_form_trigger_event_value: "blur" } do |f| %>
    <%= f.text_field :title, data: { auto_submit_form_target: "auto" }, inline: true %>
  <% end %>
<% end %>
