# Path: gbdxtools/vector_style_expressions.py
# class StyleExpression(object):
#     """ Represents a mapbox-gl conditional for styling, knowing how
#         to turn itself into the appropriate javascript for use in
#         styling a layer.
#         
#         Returns:
#             list of values for mapbox-gl conditional
#     """
#     def _expression_def(self):
#         """ Creates the list values which will be passed as a mapbox-gl
#             conditional expression.
#         """
#         raise NotImplementedError()
# 
#     @property
#     def expression(self):
#         return self._expression_def()


from gbdxtools.vector_style_expressions import StyleExpression


class VectorStyle(object):
    """ Allows setting parameters common to all layer styles

        Args:
            opacity (float/StyleExpression/list):  the opacity of the circles (will accept either a float value, a
                    StyleExpression, or a list representing a mapbox-gl conditional expression)
            color (str/StyleExpression/list): the color of the circles (will accept either an an rgb/hex/html-color-name
                    string, a StyleExpression, or a list representing a mapbox-gl conditional expression)
            translate: (float): the offset from the original vector location at which the vector will be rendered
    """
    def __init__(self, opacity=1.0, color='rgb(255,0,0)', translate=None, **kwargs):
       
        self.opacity = opacity
        self.color = color
        self.translate = translate
        self.type = None

    @staticmethod
    def get_style_value(style_value):
        """
        Decides which value will be added to a style's 'paint' configuration

        Args:
            style_value: the value set on the style instance

        Returns:
            a value suitable for inclusion in a 'paint' configuration
        """

# Path: gbdxtools/vector_style_expressions.py
# class StyleExpression(object):
#     """ Represents a mapbox-gl conditional for styling, knowing how
#         to turn itself into the appropriate javascript for use in
#         styling a layer.
#         
#         Returns:
#             list of values for mapbox-gl conditional
#     """
#     def _expression_def(self):
#         """ Creates the list values which will be passed as a mapbox-gl
#             conditional expression.
#         """
#         raise NotImplementedError()
# 
#     @property
#     def expression(self):
#         return self._expression_def()


# Path: gbdxtools/vector_styles.py
from gbdxtools.vector_style_expressions import StyleExpression



class VectorStyle(object):
    """ Allows setting parameters common to all layer styles

        Args:
            opacity (float/StyleExpression/list):  the opacity of the circles (will accept either a float value, a
                    StyleExpression, or a list representing a mapbox-gl conditional expression)
            color (str/StyleExpression/list): the color of the circles (will accept either an an rgb/hex/html-color-name
                    string, a StyleExpression, or a list representing a mapbox-gl conditional expression)
            translate: (float): the offset from the original vector location at which the vector will be rendered
    """
    def __init__(self, opacity=1.0, color='rgb(255,0,0)', translate=None, **kwargs):
       
        self.opacity = opacity
        self.color = color
        self.translate = translate
        self.type = None

    @staticmethod
    def get_style_value(style_value):
        """
        Decides which value will be added to a style's 'paint' configuration

        Args:
            style_value: the value set on the style instance

        Returns:
            a value suitable for inclusion in a 'paint' configuration
        """

        if isinstance(style_value, StyleExpression):