import { HiResTimer } from '@pilotlab/lux-hi-res-timer';
import {AnimationEaseQuartic, IAnimationEaseFunction} from "@pilotlab/lux-animation";
import {DataElement} from "../../lux-elements/src/dataEntities/dataElement";
import {Color} from "@pilotlab/lux-types";
import {AttributeCollection} from "@pilotlab/lux-attributes";
import ISettingsApp from './iSettingsApp';

module lux {
    export abstract class SettingsAppBase extends DataElement implements ISettingsApp {
        constructor(data?:(SettingsAppBase | AttributeCollection | Object | string), isInitialize:boolean = true) {
            super(data, false);

            //----- animation
            this._hiResTimer = HiResTimer.timerDefault;

            if (isInitialize) this.initialize();
        }


        //===== Dimensions
        get width():number { return 1920; }
        get height():number { return 1080; }


        //===== Animation
        get timer():HiResTimer { return this._hiResTimer; }
        private _hiResTimer:HiResTimer;

        get durationQuick():number { return 0.5; }
        get durationNormal():number { return 1; }
        get durationLong():number { return 1.5; }
        get ease():IAnimationEaseFunction { return AnimationEaseQuartic.out; }


        //===== Colors
        get colorVeryLight():Color { return new Color(255, 255, 255); }
        get colorLight():Color { return new Color(240, 240, 240); }
        get colorDark():Color { return new Color(80, 80, 80); }
        get colorVeryDark():Color { return new Color(0, 0, 0); }
        get colorGrayLight():Color { return Color.fromHex('#e2e2e2'); }
        get colorGrayMediumLight():Color { return Color.fromHex('#c5c5c5'); }
        get colorGray():Color { return Color.fromHex('#9e9e9e'); }
        get colorGrayMediumDark():Color { return Color.fromHex('#6f6f6f'); }
        get colorGrayDark():Color { return Color.fromHex('#9e9e9e'); }
        get colorAccent():Color { return new Color(242, 100, 61); }


        toAttributes():AttributeCollection {
            let attributes:AttributeCollection = new AttributeCollection();
            return attributes;
        }
    } // End of class
} // End Module
