<%= tag.div data: { controller: "donut-chart", donut_chart_segments_value: budget.to_donut_segments_json }, class: "relative h-full" do %>
<% if budget.initialized? %>
Spent
"> <%= format_money(budget.actual_spending_money) %>
<%= render DS::Link.new( text: "of #{budget.budgeted_spending_money.format}", variant: "secondary", icon: "pencil", icon_position: "right", size: "sm", href: edit_budget_path(budget) ) %> <% else %>
<%= format_money Money.new(0, budget.currency || budget.family.currency) %>
<%= render DS::Link.new( text: "New budget", size: "sm", icon: "plus", href: edit_budget_path(budget) ) %> <% end %>
<% budget.budget_categories.each do |bc| %> <% end %>
<% end %>