<%# locals: (entry:, open:) %> <% status = entry[:summary][:status] meta = entry[:summary][:meta] last_synced = entry[:summary][:last_synced_at] border_class = case status when :warn then "border border-warning/25" when :err then "border border-destructive/25" else "border border-transparent" end sync_action = entry[:partial].present? ? render("settings/providers/sync_button", provider_key: entry[:provider_key], last_synced_at: last_synced) : nil status_pill = render("settings/providers/status_pill", status: status) maturity_lbl = Settings::ProviderCard.maturity_label(entry[:maturity]) details_data = entry[:auto_open_param].present? ? { controller: "auto-open", auto_open_param_value: entry[:auto_open_param] } : {} %> <%= tag.details open: open, class: "group bg-container shadow-border-xs rounded-xl #{border_class}", data: details_data do %> <%= icon "chevron-right", size: "sm", class: "!w-3.5 !h-3.5 text-secondary group-open:rotate-90 transition-transform" %>

<%= entry[:title] %>

<%= render "settings/providers/maturity_badge", label: maturity_lbl %>
<% if meta.present? %> <%= meta %> <% end %> <%= status_pill %> <%= sync_action if sync_action %>
<% if entry[:configuration] %> <%= render "settings/providers/provider_form", configuration: entry[:configuration] %> <% else %> <%= render "settings/providers/#{entry[:partial]}" %> <% end %>
<% end %>