#!/usr/bin/env bash

# shellcheck shell=bash

# ``````````````````````````````````````````````````````````````````````````````
# Function name: module_info()
#
# Description:
#   Show module info in cli.
#
# Usage:
#   module_info
#
# Examples:
#   module_info
#

function module_info() {

  # shellcheck disable=SC2034
  local _FUNCTION_ID="module_info"
  local _STATE=0

  printf "\\n  \\e[1;38m%-20.20s %-10.10s %-10.10s %-20.20s %-25.25s\\e[m\\n  %-20.20s %-10.10s %-10.10s %-20.20s %-25.25s\\n\\n" \
         "Module" \
         "Version" \
         "Profiles" \
         "Author" \
         "Contact" \
         "------" \
         "-------" \
         "--------" \
         "------" \
         "-------" \

  # shellcheck disable=SC2154
  printf "  %-20.20s %-10.10s %-10.10s %-20.20s %-25.25s\\n\\n" \
         "${_module_show[0]}" \
         "${_module_show[1]}" \
         "${_module_show[2]}" \
         "${_module_show[3]}" \
         "${_module_show[4]}"

  return $_STATE

}
