<%=
    if vector.respond_to?( :source ) && !vector.source.to_s.empty?
        code_highlight( vector.source, :html, anchor_id: "#{id}-vector-source" )
    end
%>

<table class="table">
    <tr>
        <th>Type</th>
        <th>In</th>
        <th>Action</th>

        <% if vector.respond_to? :inputs %>
        <th>Default inputs</th>
        <th>Updated inputs</th>
        <% end %>
    </tr>
    <tr>
        <td><code><%= vector.type %></code></td>
        <td>
            <a href="<%= escapeHTML vector.url %>">
                <%= escapeHTML vector.url %>
            </a>
        </td>
        <td>
            <a href="<%= escapeHTML vector.action %>">
                <%= escapeHTML vector.action %>
            </a>
        </td>

        <% if vector.respond_to? :inputs %>
        <td>
            <%= erb 'shared/hash.erb', object: vector.default_inputs, code: true %>
        </td>
        <td>
            <%= erb 'shared/hash.erb', object: vector.inputs, code: true %>
        </td>
        <% end %>
    </tr>
</table>
