# By: Riasat Ullah
# This file contains functions that will generate the context of incidents pages.

from constants import label_names as lbl
from context_manager import components_context, resources_context
from translators import label_translator as lt
from constants import static_vars, var_names


def get_support_context(lang, allowed_components):
    '''
    Context of incident list page.
    '''
    top_bar_context = components_context.get_dashboard_topbar_context(lang, allowed_components)

    page_labels = [lbl.det_category, lbl.det_create_ticket, lbl.det_helpful_resources, lbl.det_initial_setup,
                   lbl.det_subject, lbl.det_urgency, lbl.ins_submit, lbl.opt_billing, lbl.opt_critical, lbl.opt_high,
                   lbl.opt_low, lbl.opt_medium, lbl.opt_minor, lbl.opt_technical_support, lbl.sct_others,
                   lbl.ttl_advanced, lbl.ttl_details, lbl.ttl_integrations, lbl.ttl_support]

    page_descriptions = [lbl.desc_support_find_resources]

    final_context = {**top_bar_context, **lt.get_context(page_labels + page_descriptions, lang)}
    return final_context
