<%= turbo_frame_tag dom_id(@stage.workflow, :new_stage) do %>
  <%= form_with model: @stage, url: workflow_stages_path(@stage.workflow), class: "flex align-center gap-half", data: { controller: "form", turbo_frame: dom_id(@stage.workflow, :stages) } do |form| %>
    <%= form.text_field :name, required: true, autofocus: true, class: "input", data: { action: "keydown.esc@document->form#cancel" } %>
    <%= form.button type: :submit, class: "btn btn--positive txt-small" do %>
      <%= icon_tag "check" %>
      <span class="for-screen-reader">Add stage</span>
    <% end %>
    <%= link_to workflow_path(@workflow), class: "btn txt-small", data: { form_target: "cancel", controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %>
      <%= icon_tag "remove-med" %>
      <span class="for-screen-reader">Cancel</span>
    <% end %>
  <% end %>
<% end %>
