%# locals: (title:, subtitle: nil, content:, collapsible: false, open: true, auto_open_param: nil, status: nil, meta: nil, actions: nil, badge: nil) %>
<% if collapsible %>
<%= render DS::Disclosure.new(
variant: :card,
open: open,
data: auto_open_param.present? ? { controller: "auto-open", auto_open_param_value: auto_open_param } : nil
) do |disclosure| %>
<% disclosure.with_summary_content do %>
<%= icon "chevron-right", class: "text-secondary group-open:rotate-90 motion-safe:transition-transform motion-safe:duration-150" %>
<%= title %>
<%= badge if badge.present? %>
<% if subtitle.present? %>
<%= subtitle %>
<% end %>
<% if status.present? %>
<% if meta.present? %>
<%= meta %>
<% end %>
<%= status %>
<%= actions if actions.present? %>
<% end %>
<% end %>
<%= content %>
<% end %>
<% else %>
<% if title.present? %>
<%= title %>
<% if subtitle.present? %>
<%= subtitle %>
<% end %>
<% end %>
<%= content %>
<% end %>