# shellcheck disable=SC2034
IFS=$(printf ' \n\t')

# styles
bold='\33[1m'
# bold=$(tput bold)
nobold='\e[22m'
faint='\33[2m'
italic='\033[3m'
noitalic='\e[23m'
underline='\33[4m'
# underline=$(tput smul)
nounderline='\e[24m'
blink='\e[5m'
noblink='\e[25m'
inverse='\e[7m'
noinverse='\e[27m'
hidden='\33[8m'
nohidden='\e[28m'
strike='\33[9m'
nostrike='\e[29m'
whitebg='\e[47m'
blackbg='\e[40m'
nocolor='\e[0m'
noformat='\033[m'
# colors
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
yellow='\033[0;33m'
blue='\033[0;34m'
magenta='\033[0;35m'
cyan='\033[0;36m'
# reset style
reset="\033[0m"
no_style=$(tput sgr0)

# cecho - improved color-echo
#     arg $1 = message
#     arg $2 = color
# usage:
#     cecho "[info] binary installed" $red$blackbg$italic$underline
#     cecho "✔ Homebrew is ready." $green
cecho() {
  printf '%b' "${2}"
  printf '%s' "${1}"
  printf '%b\n' "${no_style}"
  return
}
# cecho() {
#   printf "${2:-">>"} %s\n" "${1} ${no_style}"
#   return
# }
# cecho_underline() {
#   printf "${2}${underline} %s\n" "${1} ${no_style}"
#   return
# }
# cecho_bold() {
#   printf "${2}${bold} %s\n" "${1} ${no_style}"
#   return
# }
