/* Copyright CloudLinux Zug GmbH 2010-2017 All Rights Reserved
 *
 * Licensed under CLOUD LINUX LICENSE AGREEMENT
 * http://cloudlinux.com/docs/LICENSE.TXT
 */

export class ViewMode {

    public linkedModes: string[] = [];

    constructor(
        public name: string,
        public title: TitleForViewMode,
        public checked: boolean,
        public active: boolean = true,
        linkedModes: string[] = []
    ) {
        this.linkedModes.push(name);
        if (linkedModes.length) {
            this.linkedModes = this.linkedModes.concat(linkedModes);
        }
    }
}

export class TitleForViewMode {

    public tooltip: string;

    constructor(
        public value: string,
        tooltip: string = ''
    ) {
        this.tooltip = !tooltip ? value : tooltip;
    };
}
