<header class="flex items-center gap-2 mb-4">
  <h1 class="text-xl text-primary font-medium">Connect SimpleFin</h1>
</header>

<% if @error_message.present? %>
  <div class="mb-4 p-3 rounded-md bg-destructive/10 text-destructive text-sm">
    <%= @error_message %>
  </div>
<% end %>

<div class="bg-container p-4 rounded-lg shadow-border-xs">
  <%= form_with model: @simplefin_item, url: simplefin_items_path, method: :post, data: { turbo: true } do |f| %>
    <div class="space-y-3">
      <div>
        <%= f.label :setup_token, "Setup token", class: "text-sm text-secondary block mb-1" %>
        <%= f.text_field :setup_token, class: "input", placeholder: "paste your SimpleFin setup token" %>
      </div>
      <div class="flex items-center gap-2">
        <%= f.submit "Connect", class: "btn btn--primary" %>
        <%= link_to "Cancel", accounts_path, class: "btn" %>
      </div>
    </div>
  <% end %>
</div>
