# frozen_string_literal: true

module ElementsHelper
  def element_menu(element)
     dropdown_menu([
       { text: "Bearbeiten",
         icon: "pencil",
         href: edit_element_path(element),
         turbo_frame: "modal",
         color: "body" },
       { text: "Löschen",
         icon: "trash",
         href: element_path(element),
         color: :danger,
         method: :delete,
         confirm: "Bist du sicher?" } ],
       klass: "ms-auto")
  end
end
