summaryrefslogtreecommitdiff
path: root/app/helpers/analytics/navbar_helper.rb
blob: 091571ff15a3210cff790cbec313c8c0e654e910 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# frozen_string_literal: true

module Analytics
  module NavbarHelper
    class NavbarSubItem
      attr_reader :title, :path, :link, :link_to_options

      def initialize(title:, path:, link:, link_to_options: {})
        @title = title
        @path = path
        @link = link
        @link_to_options = link_to_options.merge(title: title)
      end
    end

    def group_analytics_navbar_links(group, current_user)
      []
    end

    private

    def navbar_sub_item(args)
      NavbarSubItem.new(**args)
    end
  end
end

Analytics::NavbarHelper.prepend_mod_with('Analytics::NavbarHelper')