<%# locals: (account:, url:) %>

<%= styled_form_with model: account, url: url, scope: :account, data: { turbo: false }, class: "flex flex-col gap-4 justify-between grow" do |form| %>
  <div class="grow space-y-2">
    <%= form.hidden_field :accountable_type %>
    <%= form.hidden_field :return_to, value: params[:return_to] %>

    <%= form.text_field :name, placeholder: t(".name_placeholder"), required: "required", label: t(".name_label") %>
    <%= form.money_field :balance, label: t(".balance"), required: true, default_currency: Current.family.currency %>

    <%= yield form %>
  </div>

  <%= form.submit %>
<% end %>
