<%# locals: (account:, title: nil, subtitle: nil) %>
<% content = yield %> <% if content.present? %> <%= content %> <% else %>
<%= render "accounts/logo", account: account %>

<%= title || account.name %>

<% if subtitle.present? %>

<%= subtitle %>

<% end %>
<% end %>
<% if account.plaid_account_id.present? %> <% if Rails.env.development? %> <%= button_to sync_plaid_item_path(account.plaid_account.plaid_item), disabled: account.syncing?, data: { turbo: false }, class: "flex items-center gap-2", title: "Sync Account" do %> <%= lucide_icon "refresh-cw", class: "w-4 h-4 text-gray-500 hover:text-gray-400" %> <% end %> <% end %> <% else %> <%= button_to sync_account_path(account), disabled: account.syncing?, data: { turbo: false }, class: "flex items-center gap-2", title: "Sync Account" do %> <%= lucide_icon "refresh-cw", class: "w-4 h-4 text-gray-500 hover:text-gray-400" %> <% end %> <% end %> <%= render "accounts/show/menu", account: account %>
<% if account.highest_priority_issue %> <%= render partial: "issues/issue", locals: { issue: account.highest_priority_issue } %> <% end %>