2023-10-30 15:37:04 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class MainNavigation::InstructeurExpertNavigationComponent < ApplicationComponent
|
|
|
|
def instructeur?
|
|
|
|
helpers.instructeur_signed_in?
|
|
|
|
end
|
|
|
|
|
|
|
|
def expert?
|
|
|
|
helpers.expert_signed_in?
|
|
|
|
end
|
|
|
|
|
|
|
|
def aria_current_for(page)
|
2024-04-05 15:14:58 +02:00
|
|
|
{ current: page == current_page ? true : nil }
|
2023-10-30 15:37:04 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def current_page
|
|
|
|
case controller_name
|
|
|
|
when 'avis'
|
|
|
|
:avis
|
|
|
|
when 'procedures', 'dossiers'
|
|
|
|
:procedure
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|