<%= t(".title") %>

<%= t(".description", product: product_name) %>

<%= styled_form_with model: Setting.new, url: settings_hosting_path, method: :patch, data: { controller: "auto-submit-form", auto_submit_form_trigger_event_value: "change" } do |form| %>
<%= form.select :onboarding_state, options_for_select( [ [ t(".states.open"), "open" ], [ t(".states.closed"), "closed" ], [ t(".states.invite_only"), "invite_only" ] ], Setting.onboarding_state ), { label: false }, { data: { auto_submit_form_target: "auto" } } %>
<% end %>

<%= t(".email_confirmation_title") %>

<%= t(".email_confirmation_description") %>

<%= styled_form_with model: Setting.new, url: settings_hosting_path, method: :patch, data: { controller: "auto-submit-form", auto_submit_form_trigger_event_value: "change" } do |form| %> <%= form.toggle :require_email_confirmation, { data: { auto_submit_form_target: "auto" } } %> <% end %>
<% if Setting.onboarding_state == "invite_only" %>
<%= t(".generated_tokens") %>
<%= render DS::Button.new( text: t(".generate_tokens"), variant: "primary", href: invite_codes_path, method: :post ) %>
<%= turbo_frame_tag :invite_codes, src: invite_codes_path %>
<% end %>