<div class="collapse collapse-plus bg-base-200">
  <input type="checkbox">
  <div class="collapse-title text-xl font-medium">
    <div>
      <%= t('completed_form_message') %>
    </div>
  </div>
  <div class="collapse-content">
    <%= form_for AccountConfigs.find_or_initialize_for_key(current_account, AccountConfig::FORM_COMPLETED_MESSAGE_KEY), url: settings_personalization_path, method: :post, html: { autocomplete: 'off', class: 'space-y-4' } do |f| %>
      <%= f.hidden_field :key %>
      <%= f.fields_for :value, Struct.new(:title, :body).new(*(f.object.value || {}).values_at('title', 'body')) do |ff| %>
        <div class="form-control">
          <%= ff.label :title, t('title'), class: 'label' %>
          <%= ff.text_field :title, class: 'base-input', dir: 'auto' %>
        </div>
        <div class="form-control">
          <%= ff.label :body, t('body'), class: 'label' %>
          <autoresize-textarea>
            <%= ff.text_area :body, class: 'base-input w-full py-2', dir: 'auto' %>
          </autoresize-textarea>
        </div>
      <% end %>
      <div class="form-control pt-2">
        <%= f.button button_title(title: t('save'), disabled_with: t('saving')), class: 'base-button' %>
      </div>
    <% end %>
  </div>
</div>
