<%= button(to: "/#{URI.encode_www_form(@site.domain)}/goals/#{goal.id}", method: :delete, class: "text-sm text-red-600", data: [confirm: "Are you sure you want to remove goal #{goal_name(goal)}? This will just affect the UI, all of your analytics data will stay intact."]) do %>
<% prompt = if Plausible.Goals.belongs_to_funnels?(goal) do %>
The goal <%= goal_name(goal) %> is part of some funnel(s).
If you are going to delete it, the associated funnels will be either reduced or deleted completely.
Are you sure you want to remove goal <%= goal_name(goal) %>?
<% else %>
Are you sure you want to remove goal <%= goal_name(goal) %>? This will just affect the UI, all of your analytics data will stay intact.