<%= form_for @user, html: { id: "ux-customization-form", class: "grid gap-6" } do |f| %>
  <div class="crayons-card grid gap-6 p-6">
    <h2>Style Customization</h2>

    <div class="crayons-field">
      <%= f.label :config_theme, "Site Theme", class: "crayons-field__label" %>
      <div class="theme-selector-field grid gap-4 grid-cols-2 l:grid-cols-3">
        <% ["default", "night theme", "minimal light theme", "pink theme", "ten x hacker theme"].each do |theme| %>
          <%= render partial: "theme_selector", locals: { f: f, theme: theme } %>
        <% end %>
      </div>
    </div>

    <div class="crayons-field">
      <%= f.label :config_font, "Base Reading Font", class: "crayons-field__label" %>
      <div class="theme-selector-field grid gap-4 grid-cols-2 l:grid-cols-3">
        <% ["default", "sans serif", "monospace", "comic sans", "open dyslexic"].each do |font| %>
          <%= render partial: "font_selector", locals: { f: f, font: font } %>
        <% end %>
      </div>
    </div>

    <div class="crayons-field">
      <%= f.label :config_navbar, "Site Navbar", class: "crayons-field__label" %>
      <div class="theme-selector-field grid gap-4 grid-cols-2 l:grid-cols-3">
        <% ["default", "static"].each do |navbar| %>
          <%= render partial: "navbar_selector", locals: { f: f, navbar: navbar } %>
        <% end %>
      </div>
    </div>
  </div>

  <div class="crayons-card grid gap-6 p-6">
    <h2>Writing</h2>
    <div class="crayons-field">
      <%= f.label :editor_version, "Editor Version", class: "crayons-field__label" %>
      <div class="theme-selector-field grid gap-4 grid-cols-2 l:grid-cols-3">
        <% ["v1", "v2"].each do |version| %>
          <%= render partial: "editor_selector", locals: { f: f, version: version } %>
        <% end %>
      </div>
    </div>
  </div>

  <div class="crayons-card grid gap-6 p-6">
    <h2>Content Customization</h2>
    <div class="crayons-field">
      <%= f.label :experience_level, "What is your approximate coding experience level (1-5)?", class: "crayons-field__label" %>
      <div class="theme-selector-field grid grid-cols-5">
        <% ["1", "3", "5", "8", "10"].each_with_index do |exp, i| %>
          <%= render partial: "experience_selector", locals: { f: f, exp: exp, i: i } %>
        <% end %>
      </div>
      <p>This will not be displayed on your profile or anywhere publicly. It helps gently determine what content you are shown along with tags you follow etc.</p>
    </div>
  </div>

  <%= f.hidden_field :tab, value: @tab, id: nil %>
  <div><button class="crayons-btn" type="submit">Submit</button></div>
<% end %>
