<%# locals: (entry:) %>

<%= styled_form_with model: [entry.account, entry],
                    url: entry.new_record? ? account_valuations_path(entry.account) : account_entry_path(entry.account, entry),
                    class: "space-y-4",
                    data: { turbo: false } do |form| %>
  <div class="space-y-3">
    <%= form.date_field :date, label: true, required: true, value: Date.today, min: Account::Entry.min_supported_date, max: Date.today %>
    <%= form.money_field :amount, label: t(".amount"), required: true, default_currency: Current.family.currency %>
  </div>

  <%= form.submit t(".submit") %>
<% end %>
