# shellcheck shell=dash

# TODO: ...
___x_cmd_mac_flightmode(){
    [ "$#" -gt 0 ] || set -- status

    local op="$1";  shift
    case "$op" in
        enable|disable|status)
            ___x_cmd_mac_flightmode_"$op" "$@"                ;;
        # -h|--help)
        #     ___x_cmd help -m mac flightmode                  ;;
        *)  N=mac M="Unknown subcmd -> $op" log:ret:64        ;;
    esac
}


___x_cmd_mac_flightmode_disable(){
    ___x_cmd_mac_wifi enable
    ___x_cmd_mac_bluetooth enable
}

___x_cmd_mac_flightmode_enable(){
    ___x_cmd_mac_wifi disable
    ___x_cmd_mac_bluetooth disable
    # TODO: Turn off location services
}

___x_cmd_mac_flightmode_status(){
    ___x_cmd_mac_wifi status
    ___x_cmd_mac_bluetooth status
}
