aboutsummaryrefslogtreecommitdiffstats
path: root/src/angular/checklist/models/ChecklistItem.ts
blob: e2d812afec854733570c4f9418df6247cd08ef88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { ChecklistModel } from "./Checklist";
import { isUndefined } from "util";

export class ChecklistItemModel {
    public label: string;
    public value: any;
    public disabled: boolean;
    public isChecked: boolean;
    public subLevelChecklist: ChecklistModel;
    constructor(label: string, disabled?: boolean, isChecked?: boolean, subLevelChecklist?: ChecklistModel, value?: any) {
        this.label = label;
        this.disabled = disabled;
        this.isChecked = isChecked;
        this.value = isUndefined(value) ? label : value;
        this.subLevelChecklist = subLevelChecklist;
    }
}