<span class="text-lg font-black <%= 'underline decoration-dotted' if visit.suggested? %>"
      data-controller="visit-name"
      data-api_key="<%= current_user.api_key %>"
      data-id="<%= visit.id %>">
  <!-- Visit Name Display -->
  <span
    data-visit-name="<%= visit.id %>"
    data-visit-name-target="name"
    data-action="click->visit-name#edit"
    data-tip="Click to change visit name"
    class='hover:cursor-pointer tooltip'>
    <%= visit.default_name %>
  </span>

  <!-- Visit Name Input -->
  <input
    type="text"
    value="<%= visit.default_name %>"
    data-visit-name-target="input"
    data-action="blur->visit-name#save keydown->visit-name#handleEnter"
    class="hidden input input-sm input-bordered w-full max-w-xs"
  />
</span>
