/*
 * Copyright (C) 2018 Robert Bosch GmbH Copyright (C) 2018 Robert Bosch Manufacturing Solutions GmbH, Germany. All rights reserved.
 */

import { InputType } from './input-type.enum';
import { DataSourceValue } from './data-source-value';

/**
 * Settings will be available for the user
 */
export interface UserSetting {
  /**
   * Unique identifier
   */
  id: string;
  /**
   * ID of a available category
   */
  categoryId?: string;
  /**
   * Values must be set, if we expect a static list in select box
   * or dataSource url must be set to retrieve values from service
   */
  values?: DataSourceValue[];
  /**
   * Data source url
   */
  dataSource?: string;
  /**
   * Input type in the settings form
   */
  inputType?: InputType;
  /**
   * Input label, will be displayed
   */
  label?: string;
  /**
   * Can be a values.id or any other value
   */
  defaultValue?: any;
  /**
   * Enables/Disables the form control in the widgetSettingsForm
   */
  isEnabled?: boolean;
}
