/**
 * @deprecated
 */
export class ListItemModel {
  /**
   * The data for the item in the list.
   */
  public data: any;

  /**
   * The ID for the item in the list.
   * @required
   */
  public id: string;

  /**
   * Whether the item in the list is selected.
   * @default false
   */
  public isSelected?: boolean;

  constructor(id: string, data?: any, isSelected?: boolean) {
    if (id === undefined) {
      throw new Error('All list item models require an ID');
    }

    this.id = id;

    if (data !== undefined) {
      this.data = data;
    }

    if (isSelected !== undefined) {
      this.isSelected = isSelected;
    }
  }
}
