module ActiveAdmin::Resource::Sidebars

def clear_sidebar_sections!

def clear_sidebar_sections!
  @sidebar_sections = []
end

def sidebar_sections

def sidebar_sections
  @sidebar_sections ||= []
end

def sidebar_sections?

def sidebar_sections?
  !!@sidebar_sections && @sidebar_sections.any?
end

def sidebar_sections_for(action, render_context = nil)

def sidebar_sections_for(action, render_context = nil)
  sidebar_sections.select{|section| section.display_on?(action, render_context) }
end