/*
 * <<
 * Davinci
 * ==
 * Copyright (C) 2016 - 2017 EDP
 * ==
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * >>
 */

import { createTypes } from 'app/utils/redux'

enum Types {
  LOAD_DASHBOARD_DETAIL = 'davinci/Dashboard/LOAD_DASHBOARD_DETAIL',
  LOAD_DASHBOARD_DETAIL_SUCCESS = 'davinci/Dashboard/LOAD_DASHBOARD_DETAIL_SUCCESS',
  LOAD_DASHBOARD_DETAIL_FAILURE = 'davinci/Dashboard/LOAD_DASHBOARD_DETAIL_FAILURE',

  ADD_DASHBOARD_ITEMS = 'davinci/Dashboard/ADD_DASHBOARD_ITEMS',
  ADD_DASHBOARD_ITEMS_SUCCESS = 'davinci/Dashboard/ADD_DASHBOARD_ITEMS_SUCCESS',
  ADD_DASHBOARD_ITEMS_FAILURE = 'davinci/Dashboard/ADD_DASHBOARD_ITEMS_FAILURE',

  EDIT_DASHBOARD_ITEM = 'davinci/Dashboard/EDIT_DASHBOARD_ITEM',
  EDIT_DASHBOARD_ITEM_SUCCESS = 'davinci/Dashboard/EDIT_DASHBOARD_ITEM_SUCCESS',
  EDIT_DASHBOARD_ITEM_FAILURE = 'davinci/Dashboard/EDIT_DASHBOARD_ITEM_FAILURE',

  EDIT_DASHBOARD_ITEMS = 'davinci/Dashboard/EDIT_DASHBOARD_ITEMS',
  EDIT_DASHBOARD_ITEMS_SUCCESS = 'davinci/Dashboard/EDIT_DASHBOARD_ITEMS_SUCCESS',
  EDIT_DASHBOARD_ITEMS_FAILURE = 'davinci/Dashboard/EDIT_DASHBOARD_ITEMS_FAILURE',

  DELETE_DASHBOARD_ITEM = 'davinci/Dashboard/DELETE_DASHBOARD_ITEM',
  DELETE_DASHBOARD_ITEM_SUCCESS = 'davinci/Dashboard/DELETE_DASHBOARD_ITEM_SUCCESS',
  DELETE_DASHBOARD_ITEM_FAILURE = 'davinci/Dashboard/DELETE_DASHBOARD_ITEM_FAILURE',

  CLEAR_CURRENT_DASHBOARD = 'davinci/Dashboard/CLEAR_CURRENT_DASHBOARD',

  SET_FULL_SCREEN_PANEL_ITEM_ID = 'davinci/Dashboard/SET_FULL_SCREEN_PANEL_ITEM_ID',

  LOAD_DASHBOARD_ITEM_DATA = 'davinci/Dashboard/LOAD_DASHBOARD_ITEM_DATA',
  LOAD_DASHBOARD_ITEM_DATA_SUCCESS = 'davinci/Dashboard/LOAD_DASHBOARD_ITEM_DATA_SUCCESS',
  LOAD_DASHBOARD_ITEM_DATA_FAILURE = 'davinci/Dashboard/LOAD_DASHBOARD_ITEM_DATA_FAILURE',
  LOAD_BATCH_DATA_WITH_CONTROL_VALUES = 'davinci/Dashboard/LOAD_BATCH_DATA_WITH_CONTROL_VALUES',

  INITIATE_DOWNLOAD_TASK = 'davinci/Download/INITIATE_DOWNLOAD_TASK',
  INITIATE_DOWNLOAD_TASK_SUCCESS = 'davinci/Download/INITIATE_DOWNLOAD_TASK_SUCCESS',
  INITIATE_DOWNLOAD_TASK_FAILURE = 'davinci/Download/INITIATE_DOWNLOAD_TASK_FAILURE',

  LOAD_DASHBOARD_SHARE_LINK = 'davinci/Dashboard/LOAD_DASHBOARD_SHARE_LINK',
  LOAD_DASHBOARD_SHARE_LINK_SUCCESS = 'davinci/Dashboard/LOAD_DASHBOARD_SHARE_LINK_SUCCESS',
  LOAD_DASHBOARD_SHARE_LINK_FAILURE = 'davinci/Dashboard/LOAD_DASHBOARD_SHARE_LINK_FAILURE',
  LOAD_DASHBOARD_AUTHORIZED_SHARE_LINK_SUCCESS = 'davinci/Dashboard/LOAD_DASHBOARD_AUTHORIZED_SHARE_LINK_SUCCESS',
  LOAD_DASHBOARD_PASSWORD_SHARE_LINK_SUCCESS = 'davinci/Dashboard/LOAD_DASHBOARD_PASSWORD_SHARE_LINK_SUCCESS',


  LOAD_WIDGET_SHARE_LINK = 'davinci/Dashboard/LOAD_WIDGET_SHARE_LINK',
  LOAD_WIDGET_SHARE_LINK_SUCCESS = 'davinci/Dashboard/LOAD_WIDGET_SHARE_LINK_SUCCESS',
  LOAD_WIDGET_SHARE_LINK_FAILURE = 'davinci/Dashboard/LOAD_WIDGET_SHARE_LINK_FAILURE',
  LOAD_WIDGET_AUTHORIZED_SHARE_LINK_SUCCESS = 'davinci/Dashboard/LOAD_WIDGET_AUTHORIZED_SHARE_LINK_SUCCESS',
  LOAD_WIDGET_PASSWORD_SHARE_LINK_SUCCESS = 'davinci/Dashboard/LOAD_WIDGET_PASSWORD_SHARE_LINK_SUCCESS',


  OPEN_SHARE_PANEL = 'davinci/Dashboard/OPEN_SHARE_PANEL',
  CLOSE_SHARE_PANEL = 'davinci/Dashboard/CLOSE_SHARE_PANEL',

  LOAD_WIDGET_CSV = 'davinci/Dashboard/LOAD_WIDGET_CSV',
  LOAD_WIDGET_CSV_SUCCESS = 'davinci/Dashboard/LOAD_WIDGET_CSV_SUCCESS',
  LOAD_WIDGET_CSV_FAILURE = 'davinci/Dashboard/LOAD_WIDGET_CSV_FAILURE',

  RENDER_DASHBOARDITEM = 'davinci/Dashboard/RENDER_DASHBOARDITEM',
  RESIZE_DASHBOARDITEM = 'davinci/Dashboard/RESIZE_DASHBOARDITEM',
  RESIZE_ALL_DASHBOARDITEM = 'davinci/Dashboard/RESIZE_ALL_DASHBOARDITEM',
  RENDER_CHART_ERROR = 'davinci/Dashboard/RENDER_CHART_ERROR',
  DRILL_DASHBOARDITEM = 'davinci/Dashboard/DRILL_DASHBOARDITEM',
  DELETE_DRILL_HISTORY = 'davinci/Dashboard/DELETE_DRILL_HISTORY',
  DRILL_PATH_SETTING = 'davinci/Dashboard/DRILL_PATH_SETTING',
  DRILL_PATH_DASHBOARDITEM = 'davinci/Dashboard/DRILL_PATH_DASHBOARDITEM',
  DELETE_DRILL_PATH_HISTORY = 'davinci/Dashboard/DELETE_DRILL_PATH_HISTORY',
  SELECT_DASHBOARD_ITEM_CHART = 'davinci/Dashboard/SELECT_DASHBOARD_ITEM_CHART',
  MONITORED_SYNC_DATA_ACTION = 'davinci/Dashboard/MONITORED_SYNC_DATA_ACTION',
  MONITORED_SEARCH_DATA_ACTION = 'davinci/Dashboard/MONITORED_SEARCH_DATA_ACTION',
  MONITORED_LINKAGE_DATA_ACTION = 'davinci/Dashboard/MONITORED_LINKAGE_DATA_ACTION'
}

export const ActionTypes = createTypes(Types)

export enum DashboardTypes {
  Folder = 0,
  Dashboard = 1
}
