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

import { UserSetting } from './userSetting';
import { Widget } from './widget';

/**
 * Will be fired, user setting changes
 * (triggered by the user)
 */
export interface UserSettingChangeEvent {
  /**
   * UserSetting which changed
   * Optional, because settings like size, title aren't set in the userSettings array.
   */
  setting?: UserSetting;
  /**
   * The new input value from the user
   */
  newValue: any;
  /**
   * Widget which was changed
   */
  widget: Widget;

  /**
   * Is true, when the user cancels the settings form, and the values are set back to default
   */
  cancelled?: boolean;
}
