% content_for :title, t(".settings") %>
<%= t(".settings") %>
<%= form_with url: admin_settings_path, method: :patch, class: "card card-body max-w-xl space-y-4" do |f| %>
<% if @errors.present? %>
<% @errors.each do |e| %>- <%= e %>
<% end %>
<% end %>
<%= t(".uploads") %>
<% upload = Setting::INTEGERS["max_upload_mb"] %>
<%= label_tag "settings[max_upload_mb]", Setting::LABELS["max_upload_mb"], class: "label" %>
<%= number_field_tag "settings[max_upload_mb]", @values["max_upload_mb"], id: "settings_max_upload_mb",
min: upload[:in].min, max: upload[:in].max, step: 1, required: true, class: "input w-32" %>
<%= t(".the_largest_single_file_anyone_html", default_mb: (upload[:default]), max: (upload[:in].max)) %>
<%= t(".a_proxy_in_front_of_html") %>
<%= t(".logbook_transcription_with_claude_reads_html", pdf_mb: (LogbookTranscriber::MAX_PDF_BYTES / 1.megabyte), image_mb: (LogbookTranscriber::MAX_IMAGE_BYTES / 1.megabyte)) %>
<%= t(".backups") %>
<% kept = Setting::INTEGERS["backups_kept"] %>
<%= label_tag "settings[backups_kept]", Setting::LABELS["backups_kept"], class: "label" %>
<%= number_field_tag "settings[backups_kept]", @values["backups_kept"], id: "settings_backups_kept", min: kept[:in].min, max: kept[:in].max,
step: 1, required: true, class: "input w-32" %>
<%= t(".a_verified_copy_of_the_html", link: (link_to t(".off_site_backup"), admin_offsite_backup_path, class: "link")) %>
<% okept = Setting::INTEGERS["offsite_backups_kept"] %>
<%= label_tag "settings[offsite_backups_kept]", Setting::LABELS["offsite_backups_kept"], class: "label" %>
<%= number_field_tag "settings[offsite_backups_kept]", @values["offsite_backups_kept"], id: "settings_offsite_backups_kept", min: okept[:in].min, max: okept[:in].max,
step: 1, required: true, class: "input w-32" %>
<%= t(".with_off_site_backup_to") %>
<%= t(".document_search") %>
<%= label_tag "settings[documents_claude_text]", t(".read_scanned_documents_with"), class: "label" %>
<%= select_tag "settings[documents_claude_text]", options_for_select([ [ t(".tesseract_free_on_this_server"), 0 ], [ t(".claude_better_on_handwriting_uses"), 1 ] ], @values["documents_claude_text"].to_i),
id: "settings_documents_claude_text", class: "input" %>
<%= t(".text_in_documents_is_read_html", blank: (t(".it_isn_t") if ENV["ANTHROPIC_API_KEY"].blank?)) %>
<%= f.submit t(".save_settings"), class: "btn-primary" %><%= link_to t(".cancel"), admin_about_path, class: "btn-secondary" %>
<% end %>