#!/bin/bash

if [[ -z "${WELCOME_SCRIPT_PATH}" ]]; then
  WELCOME_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." &>/dev/null && pwd)"
fi

#region INCLUDES
. "${WELCOME_SCRIPT_PATH}/config/config_colors.sh"
. "${WELCOME_SCRIPT_PATH}/config/config_conf.sh"
. "${WELCOME_SCRIPT_PATH}/func/message.sh"
. "${WELCOME_SCRIPT_PATH}/func/message_display.sh"
#endregion

#region CHECKS
if ! command -v jq &> /dev/null; then
    msg_error " 'jq' n'est pas installé."
    msg_warning "Veuillez l'installer pour exécuter ce script : apt install jq"
    exit 1
fi
#endregion

#region MAIN
display_conditional_list "$CONF_LIST_CONFIG_JSON"
#endregion

#region INFOS
. "${WELCOME_SCRIPT_PATH}/inc/infos.sh"
#endregion