# Path: css2video/components/base.py
# class BaseComponent(object):
#     """A base component for other CSS components
# 
#     Public attributes:
#         - Dict: Dictionary form of the component
#     """
# 
#     def __init__(self, Dict):
#         super(BaseComponent, self).__init__()
#         self.Dict = Dict
# 
#     @classmethod
#     def from_dict(cls, Dict):
#         """Creates a component from dictionary"""
#         return cls(Dict=Dict)
# 
#     def to_dict(self):
#         """Returns the dictionary form of the component"""
#         return self.Dict
# 
#     def duplicate(self):
#         """Returns a duplicate of this component"""
#         return self.__class__(Dict=copy.deepcopy(self.Dict))


from .base import BaseComponent
            for p in self.Dict.get('properties', [])
        }

    def animation_properties(self):
        '''Returns all the animation related properties as a dictionary'''
        properties = {
            'animation-name': '',
            'animation-duration': 0,
            'animation-delay': 0,
            'animation-iteration-count': 1,
            'animation-timing-function': 'ease'
        }
        for key in properties:
            if self.properties.get(key):
                value = self.properties.get(key)
                properties[key] = value.get('value')
        return properties

    def property_list(self):
        '''Returns a list of property names'''
        return [p['property_name'] for p in self.Dict.get('properties', [])]

    def add_property(self, name, value):
        '''Add a new property and value'''
        self.Dict['properties'].append({
            'property_name': name,
            'property_value': value
        })



# Path: css2video/components/base.py
# class BaseComponent(object):
#     """A base component for other CSS components
# 
#     Public attributes:
#         - Dict: Dictionary form of the component
#     """
# 
#     def __init__(self, Dict):
#         super(BaseComponent, self).__init__()
#         self.Dict = Dict
# 
#     @classmethod
#     def from_dict(cls, Dict):
#         """Creates a component from dictionary"""
#         return cls(Dict=Dict)
# 
#     def to_dict(self):
#         """Returns the dictionary form of the component"""
#         return self.Dict
# 
#     def duplicate(self):
#         """Returns a duplicate of this component"""
#         return self.__class__(Dict=copy.deepcopy(self.Dict))


# Path: css2video/components/rule.py
from .base import BaseComponent

            for p in self.Dict.get('properties', [])
        }

    def animation_properties(self):
        '''Returns all the animation related properties as a dictionary'''
        properties = {
            'animation-name': '',
            'animation-duration': 0,
            'animation-delay': 0,
            'animation-iteration-count': 1,
            'animation-timing-function': 'ease'
        }
        for key in properties:
            if self.properties.get(key):
                value = self.properties.get(key)
                properties[key] = value.get('value')
        return properties

    def property_list(self):
        '''Returns a list of property names'''
        return [p['property_name'] for p in self.Dict.get('properties', [])]

    def add_property(self, name, value):
        '''Add a new property and value'''
        self.Dict['properties'].append({
            'property_name': name,
            'property_value': value
        })



class KeyframePropertiesComponent(BaseComponent):