
___x_cmd_winget_agree(){
    [ ! -f "$___X_CMD_ROOT_DATA/winget/agree.txt" ] || return 0

    local id

    local msg="To work around technical issues with the interactive prompt in 'winget', we're using the '--accept-source-agreements' flag with all subcommands.
 This bypasses the prompt and allows 'winget' to function properly.  Without accepting the source agreements, the 'winget' module cannot operate. "

    local id

    ___x_cmd ui select id  "$msg" \
        "Yes. I will allow using --accept-source-agreements when invoking winget command." \
        "No."    || return $?

        # "Before agreeing, I would like to see more details."

    case "$id" in
        1)      printf "yes" >"$___X_CMD_ROOT_DATA/winget/agree.txt" ;;
        2)      winget:info "Exit."; return 1 ;;
        *)      winget:info "Exit."; return 1 ;;
    esac
}
