module PagesHelper
  def page_menu(page)
     dropdown_menu([
       {
         text: "Alle zu [s]",
         href: "#",
         action: "click->details-list#closeAll"
       },
       {
         text: "Alle auf [a]",
         href: "#",
         action: "click->details-list#openAll"
       },
       { text: "Bearbeiten",
         icon: "pencil",
         href: edit_page_path(page),
         turbo_frame: "modal",
         color: "body" },
       { text: "Löschen",
         icon: "trash",
         href: page_path(page),
         color: :danger,
         method: :delete,
         confirm: "Bist du sicher?" } ],
       klass: "ms-auto")
  end
end
