# shellcheck shell=sh disable=SC3043 disable=SC2034,SC2154

___x_cmd_theme_prompt_format(){
    ___x_cmd_theme_ide
}

xrc:theme:widget msg cwd2 vcm symbol emoji

# AKA: c2vs
___x_cmd_theme_ide(){
    local x_

    ___x_cmd_theme_headline_print

    ___x_cmd_theme_widget_cwd2
    [ -z "$X_cwd2" ] || X_left="${X_cwd2}"

    ___x_cmd_theme_widget_vcm
    [ -z "$X_vcm" ]     || X_left="${X_left} ${X_vcm}"

    ___x_cmd_theme_widget_emoji
    ___x_cmd_theme_widget_emoji_escape_bug
    [ -z "$X_emoji" ] || X_left="${X_emoji}  ${X_left}"

    ___x_cmd_theme_widget_symbol

    local promptline="${X_left} ${X_symbol}"
    ______x_cmd_theme_prompt_remove_escapes_ "$promptline"

    if [ -z "$COLUMNS" ] || [ "${#x_}" -lt "$((COLUMNS/3))" ]; then
        printf "%s "        "${promptline}"
    else
        printf "%s\n"       "${X_left}"
        printf "%s "        "${X_symbol}"
    fi
    ___X_CMD_THEME_TRANSIENT_PS1="$X_symbol"
}

XTW_vcm_prefix=""
XTW_vcm_suffix=""
XTW_vcm_ref_prefix="("
XTW_vcm_ref_suffix=")"


___x_cmd_theme_linecount_ps1=2

# Bug at zsh
# ___x_cmd_theme_l_vscode(){
#     theme:comp msg  cwd_full
#     theme:style_ bold dim "${x_cwd_full}";   x_cwd_full="$x_"

#     theme:comp:symbol "\$" "bold green" "bold red"

#     ___x_cmd_theme_prompt_format___vcm_;            local _vcm="$x_"

#     theme:col2_ "$" "${_vcm} ${x_cwd_full}  "

#     printf "\n%s${x_msg_wrap}%s\r%s "   \
#         "${x_msg_text}" \
#         "${x_}" "${x_symbol}"
# }
