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

import { Cell, Field, Row } from '../utils/row';

export class EnvRow extends Row {

    set name(value: string) {
        this.cells['name'].value = value;
        this.cells['name'].initialValue = value;
    }

    get name(): string {
        return this.cells['name'].value;
    }

    set value(value: string) {
        this.cells['value'].value = value;
        this.cells['value'].initialValue = value;
    }
    get value(): string {
        return this.cells['value'].value;
    }

    hasEdit = true;
    hasDeleteButton = true;

    constructor () {
        super();
        this.cells['name'] = new Cell([new Field({value: ''})]);
        this.cells['value'] = new Cell([new Field({value: ''})]);
    }
}
