import {
    DataType,
    Attribute,
    Attributes,
    AttributeChangeOptions,
    Color
} from '@pilotlab/attributes';


export class StyleElement extends Attribute<Attributes> {
    constructor(data?:(StyleElement | Attributes | Object | string)) {
        super('styleElement', data, DataType.COLLECTION);
        this.p_color = <Color>this.children.get('color', new Color(), DataType.COLOR, null, AttributeChangeOptions.zero);
    }


    get color():Color { return this.p_color.value; }
    set color(value:Color) { this.p_color.value.set(value, AttributeChangeOptions.save.durationZero); }
    protected p_color:Color;
} // End Class


export default StyleElement;
