<%= content_for :title, @user.name %>

<%= turbo_frame_tag 'main' do %>

  <%= turbo_stream.append 'flash', partial: 'layouts/flash' %>
  
  <div class="form-container">
    <%= link_to t(:'users.list'), url_for(controller: 'users', action: 'index'), data: {turbo_action: 'advance'}, class: 'back-link' %>

    <div class="form-header">
      <h1><%= yield :title %></h1>

      <%= button_to t(:'users.destroy'), url_for(action: 'show', id: @user), method: :delete, data: { turbo_confirm: t(:'ui.are_you_sure') }, tabindex: '-1', class: 'delete-link' %>
    </div>

    <%= render "form", user: @user %>
    
  </div>
<% end %> 