<%# locals: (family:, active_tab:, mobile: false) %>
<% if family.missing_data_provider? %>
<%= icon "triangle-alert", size: "sm", color: "warning" %>

<%= t("accounts.sidebar.missing_data") %>

<%= icon("chevron-down", color: "warning", class: "group-open:transform group-open:rotate-180") %>

<%= t("accounts.sidebar.missing_data_description", product: product_name) %>

<%= link_to t("accounts.sidebar.configure_providers"), settings_hosting_path, class: "text-yellow-600 underline" %>

<% end %> <%= render DS::Tabs.new(active_tab: active_tab, session_key: "account_sidebar_tab", testid: "account-sidebar-tabs") do |tabs| %> <% tabs.with_nav do |nav| %> <% nav.with_btn(id: "all", label: t("accounts.sidebar.tabs.all")) %> <% nav.with_btn(id: "asset", label: t("accounts.sidebar.tabs.assets")) %> <% nav.with_btn(id: "liability", label: t("accounts.sidebar.tabs.debts")) %> <% end %> <% tabs.with_panel(tab_id: "asset") do %>
<%= render DS::Link.new( text: t("accounts.sidebar.new_asset"), variant: "ghost", href: new_account_path(step: "method_select", classification: "asset"), icon: "plus", frame: :modal, full_width: true, class: "justify-start" ) %>
<% family.balance_sheet.assets.account_groups.each do |group| %> <%= render "accounts/accountable_group", account_group: group, mobile: mobile %> <% end %>
<% end %> <% tabs.with_panel(tab_id: "liability") do %>
<%= render DS::Link.new( text: t("accounts.sidebar.new_debt"), variant: "ghost", href: new_account_path(step: "method_select", classification: "liability"), icon: "plus", frame: :modal, full_width: true, class: "justify-start" ) %>
<% family.balance_sheet.liabilities.account_groups.each do |group| %> <%= render "accounts/accountable_group", account_group: group, mobile: mobile %> <% end %>
<% end %> <% tabs.with_panel(tab_id: "all") do %>
<%= render DS::Link.new( text: t("accounts.sidebar.new_account"), variant: "ghost", full_width: true, href: new_account_path(step: "method_select"), icon: "plus", frame: :modal, class: "justify-start" ) %>
<% family.balance_sheet.account_groups.each do |group| %> <%= render "accounts/accountable_group", account_group: group, mobile: mobile, all_tab: true %> <% end %>
<% end %> <% end %>