# shellcheck shell=dash
x log init txt
xrc:mod:lib     txt     abstract expand explain refine translate title

xrc chat

___x_cmd_txt___main(){
    [ "$#" -gt 0 ] ||   set -- --help

    local op="$1"; shift
    case "$op" in
        -h|--help)      x help -m txt ;;

        abs|abstract)   ___x_cmd_txt_abstract   "$@" ;;
        expand)         ___x_cmd_txt_expand     "$@" ;;
        refine)         ___x_cmd_txt_refine     "$@" ;;
        # rephrase)       ___x_cmd_txt_rephrase   "$@" ;;
        exp|explain)    ___x_cmd_txt_explain    "$@" ;;

        title)          ___x_cmd_txt_title      "$@" ;;

        cn|en|fr)
                        ___x_cmd_txt_translate "$op" "$@" ;;

        *)              N=txt M="Unsupported text ==> $op" log:ret:64 ;;
    esac
}

