<% if @prefill_demo_credentials %>
<%= icon "info", size: "sm", color: "blue-600" %>

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

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

<% end %> <% if AuthConfig.local_login_form_visible? %> <%= styled_form_with url: sessions_path, class: "space-y-4", data: { turbo: false } do |form| %> <%= form.email_field :email, label: t(".email"), autofocus: false, autocomplete: "email", required: "required", placeholder: t(".email_placeholder"), value: @email %> <%= form.password_field :password, label: t(".password"), required: "required", placeholder: t(".password_placeholder"), value: @password %> <%= form.submit t(".submit") %> <% end %> <% unless AuthConfig.local_login_enabled? %>

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

<% end %> <% if AuthConfig.password_features_enabled? %>
<%= link_to t(".forgot_password"), new_password_reset_path, class: "font-medium text-sm text-primary hover:underline transition" %>
<% end %> <% end %> <% providers = AuthConfig.sso_providers %> <% if providers.any? %>
<% providers.each do |provider| %> <% provider_id = provider[:id].to_s %> <% provider_name = provider[:name].to_s %> <% if provider_id == "google" || provider[:strategy].to_s == "google_oauth2" %>
<%= button_to "/auth/#{provider_name}", method: :post, form: { data: { turbo: false } }, class: "gsi-material-button w-full" do %>
<%= provider[:label].presence || t(".google_auth_connect") %> <%= provider[:label].presence || t(".google_auth_connect") %>
<% end %>
<% else %> <%= button_to "/auth/#{provider_name}", method: :post, form: { data: { turbo: false } }, class: "w-full inline-flex items-center justify-center gap-2 rounded-md border border-secondary bg-container px-4 py-2 text-sm font-medium text-primary hover:bg-secondary transition" do %> <% if provider[:icon].present? %> <%= icon provider[:icon], size: "sm" %> <% end %> <%= provider[:label].presence || provider[:name].to_s.titleize %> <% end %> <% end %> <% end %>
<% elsif !AuthConfig.local_login_form_visible? %>
<%= t(".no_auth_methods_enabled") %>
<% end %>