json.setting do
  nav_bar = default_setting.navbar
  if current_user && current_user.admin?
    nav_bar << manager_main_site_url
  end
  json.name default_setting.name
  json.nav_logo_url default_setting.nav_logo_url&.[](1..-1)
  json.login_logo_url default_setting.login_logo_url&.[](1..-1)
  json.tab_logo_url default_setting.tab_logo_url&.[](1..-1)

  json.subject_banner_url default_setting.subject_banner_url&.[](1..-1)
  json.course_banner_url default_setting.course_banner_url&.[](1..-1)
  json.competition_banner_url default_setting.competition_banner_url&.[](1..-1)
  json.moop_cases_banner_url default_setting.moop_cases_banner_url&.[](1..-1)
  json.oj_banner_url default_setting.oj_banner_url&.[](1..-1)

  json.navbar nav_bar

  json.footer default_setting.footer
  json.new_course default_course_links
  json.main_site current_laboratory.main_site?
  json.main_web_site_url main_web_site_url
  json.current_main_site_url current_main_site_url

  json.api_urls Rails.application.config_for(:configuration)["api_urls"]
  json.is_local EduSetting.get("is_local") == "true"


  json.add do
    json.array! @add
  end

  json.personal do
    json.array! @personal
  end

  json.common @common
  # json.third_party @third_party
  json.third_party_test @third_party

  json.professional_field do
    json.array! @professional_fields
  end

  if @top_system_notification.present?
    json.system_notification do 
      json.(@top_system_notification, :id, :subject, :sub_subject, :content)
      json.is_read @top_system_notification.read_member?(current_user&.id)
    end
  else
    json.system_notification nil
  end
end
