import json
import re

import click
import cligj

import mapbox
from mapboxcli.errors import MapboxCLIException


def waypoint_snapping_callback(ctx, param, value):
    results = []

    tuple_pattern = re.compile("[,]")
    int_pattern = re.compile("[0-9]")

    # value is an n-tuple, each element of
    # which contains input from the user.
    #
    # Iterate over each element, determining
    # whether to convert it to a tuple,
    # convert it to an int, or leave it as
    # a str.
    #
    # Append each element to results, which
    # the Directions SDK will attempt to
    # validate.

    if len(value) == 0:
        return None