# Path: jinja2schema/order_number.py
# class OrderNumber(object):
#     """A base Order Number class.
# 
#     .. attribute:: number
# 
#         Initial counter value.
# 
#     .. attribute:: enabled
# 
#         Counter enabled or return None.
# 
#     """
# 
#     def __init__(self, number=0, enabled=False, sub_counter_enabled=True):
#         self.start = number
#         self.number = self.start
#         self.order_enabled = enabled
#         self.sub_counter_enabled = sub_counter_enabled
# 
#     def get_next(self):
#         if self.order_enabled:
#             self.number += 1
#             return self.number
#         return None
# 
#     @contextmanager
#     def sub_counter(self):
#         if self.sub_counter_enabled:
#             counter = self.number
#             self.number = self.start
#             yield
#             self.number = counter
#             return
#         yield


from .order_number import OrderNumber

    Add a order number to make schema sortable.
    """

    ORDER_NUMBER_SUB_COUNTER = True
    """Independent subsection order numbers

    Use a separate counter in subsections as order number creator.
    """

    def __init__(self,
                 TYPE_OF_VARIABLE_INDEXED_WITH_VARIABLE_TYPE='dictionary',
                 TYPE_OF_VARIABLE_INDEXED_WITH_INTEGER_TYPE='list',
                 BOOLEAN_CONDITIONS=False,
                 PACKAGE_NAME='',
                 TEMPLATE_DIR='templates',
                 ORDER_NUMBER=False,
                 ORDER_NUMBER_SUB_COUNTER=True):
        if TYPE_OF_VARIABLE_INDEXED_WITH_VARIABLE_TYPE not in ('dictionary', 'list'):
            raise ValueError('TYPE_OF_VARIABLE_INDEXED_WITH_VARIABLE_TYPE must be'
                             'either "dictionary" or "list"')
        if TYPE_OF_VARIABLE_INDEXED_WITH_INTEGER_TYPE not in ('dictionary', 'list', 'tuple'):
            raise ValueError('TYPE_OF_VARIABLE_INDEXED_WITH_VARIABLE_TYPE must be'
                             'either "dictionary", "tuple" or "list"')
        self.TYPE_OF_VARIABLE_INDEXED_WITH_INTEGER_TYPE = TYPE_OF_VARIABLE_INDEXED_WITH_INTEGER_TYPE
        self.TYPE_OF_VARIABLE_INDEXED_WITH_VARIABLE_TYPE = TYPE_OF_VARIABLE_INDEXED_WITH_VARIABLE_TYPE
        self.BOOLEAN_CONDITIONS = BOOLEAN_CONDITIONS
        self.PACKAGE_NAME = PACKAGE_NAME
        self.TEMPLATE_DIR = TEMPLATE_DIR
        self.ORDER_NUMBER = ORDER_NUMBER

# Path: jinja2schema/order_number.py
# class OrderNumber(object):
#     """A base Order Number class.
# 
#     .. attribute:: number
# 
#         Initial counter value.
# 
#     .. attribute:: enabled
# 
#         Counter enabled or return None.
# 
#     """
# 
#     def __init__(self, number=0, enabled=False, sub_counter_enabled=True):
#         self.start = number
#         self.number = self.start
#         self.order_enabled = enabled
#         self.sub_counter_enabled = sub_counter_enabled
# 
#     def get_next(self):
#         if self.order_enabled:
#             self.number += 1
#             return self.number
#         return None
# 
#     @contextmanager
#     def sub_counter(self):
#         if self.sub_counter_enabled:
#             counter = self.number
#             self.number = self.start
#             yield
#             self.number = counter
#             return
#         yield


# Path: jinja2schema/config.py
from .order_number import OrderNumber


    Add a order number to make schema sortable.
    """

    ORDER_NUMBER_SUB_COUNTER = True
    """Independent subsection order numbers

    Use a separate counter in subsections as order number creator.
    """

    def __init__(self,
                 TYPE_OF_VARIABLE_INDEXED_WITH_VARIABLE_TYPE='dictionary',
                 TYPE_OF_VARIABLE_INDEXED_WITH_INTEGER_TYPE='list',
                 BOOLEAN_CONDITIONS=False,
                 PACKAGE_NAME='',
                 TEMPLATE_DIR='templates',
                 ORDER_NUMBER=False,
                 ORDER_NUMBER_SUB_COUNTER=True):
        if TYPE_OF_VARIABLE_INDEXED_WITH_VARIABLE_TYPE not in ('dictionary', 'list'):
            raise ValueError('TYPE_OF_VARIABLE_INDEXED_WITH_VARIABLE_TYPE must be'
                             'either "dictionary" or "list"')
        if TYPE_OF_VARIABLE_INDEXED_WITH_INTEGER_TYPE not in ('dictionary', 'list', 'tuple'):
            raise ValueError('TYPE_OF_VARIABLE_INDEXED_WITH_VARIABLE_TYPE must be'
                             'either "dictionary", "tuple" or "list"')
        self.TYPE_OF_VARIABLE_INDEXED_WITH_INTEGER_TYPE = TYPE_OF_VARIABLE_INDEXED_WITH_INTEGER_TYPE
        self.TYPE_OF_VARIABLE_INDEXED_WITH_VARIABLE_TYPE = TYPE_OF_VARIABLE_INDEXED_WITH_VARIABLE_TYPE
        self.BOOLEAN_CONDITIONS = BOOLEAN_CONDITIONS
        self.PACKAGE_NAME = PACKAGE_NAME
        self.TEMPLATE_DIR = TEMPLATE_DIR
        self.ORDER_NUMBER = ORDER_NUMBER

        self.ORDER_OBJECT = OrderNumber(number=1, enabled=self.ORDER_NUMBER,