<% content_for :title, "Edit #{@node.label}" %>

<% content_for :breadcrumbs do %>
  <nav>
    <%= render partial: 'breadcrumbs' %>
  </nav>
<% end %>

<div class="content-container">
  <h4 class="header-underline">Edit <%= @node.label %></h4>
  <div id="node_properties_editor">
    <div class="note-text-inner">
      <%= simple_form_for [current_project, @node] do |f| %>
        <%= f.input :label, label: "New name" %>

        <%=
          f.input :type_id,
            collection: node_types_collection,
            include_blank: false,
            label: 'Icon'
        %>

        <%= f.input :raw_properties, as: :text, label: 'Properties', value: @node.raw_properties, input_html: { class: :json, rows: 20 } %>

        <div class="form-actions">
          <%= f.button :submit, nil, class: 'btn btn-primary' %> or
          <%= link_to 'Cancel', project_node_path(current_project, @node) %>
        </div>
      <% end %>
    </div>
  </div>
</div>
