# Path: statik/utils.py
# def underscore_var_names(d):
#     _d = {}
#     for k, v in d.items():
#         _k = k.replace('-', '_')
#         # perform the underscoring recursively
#         _d[_k] = underscore_var_names(v) if isinstance(v, dict) else v
# 
#     return _d


from copy import deepcopy, copy
from statik.utils import underscore_var_names
import logging
# -*- coding: utf-8 -*-



logger = logging.getLogger(__name__)

__all__ = [
    "StatikContext"
]


class StatikContext(object):
    """For representing context in projects and views."""

    def __init__(
            self,
            initial=None,
            static=None,
            dynamic=None,
            for_each=None
        ):
        self.initial = initial or dict()
        self.static = underscore_var_names(
            deepcopy(static or dict())
        )
        self.dynamic = underscore_var_names(
            deepcopy(dynamic or dict())
        )

# Path: statik/utils.py
# def underscore_var_names(d):
#     _d = {}
#     for k, v in d.items():
#         _k = k.replace('-', '_')
#         # perform the underscoring recursively
#         _d[_k] = underscore_var_names(v) if isinstance(v, dict) else v
# 
#     return _d


# Path: statik/context.py
from copy import deepcopy, copy
from statik.utils import underscore_var_names
import logging

# -*- coding: utf-8 -*-



logger = logging.getLogger(__name__)

__all__ = [
    "StatikContext"
]


class StatikContext(object):
    """For representing context in projects and views."""

    def __init__(
            self,
            initial=None,
            static=None,
            dynamic=None,
            for_each=None
        ):
        self.initial = initial or dict()
        self.static = underscore_var_names(
            deepcopy(static or dict())
        )
        self.dynamic = underscore_var_names(
            deepcopy(dynamic or dict())
        )

        self.for_each = underscore_var_names(