/**
* DevExtreme (ui/scheduler.d.ts)
* Version: 21.1.0 (build 21016-0316)
* Build date: Sat Jan 16 2021
*
* Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import '../jquery_augmentation';
import './scheduler/utils';

import {
    dxElement
} from '../core/element';

import {
    template
} from '../core/templates/template';

import DataSource, {
    DataSourceOptions
} from '../data/data_source';

import {
    event
} from '../events/index';

import {
    CollectionWidgetItem
} from './collection/ui.collection_widget.base';

import dxDraggable from './draggable';

import dxForm from './form';
import dxPopup from './popup';

import dxSortable from './sortable';

import Widget, {
    WidgetOptions
} from './widget/ui.widget';

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface dxSchedulerOptions extends WidgetOptions<dxScheduler> {
    /**
     */
    adaptivityEnabled?: boolean;
    /**
     */
    allDayExpr?: string;
    /**
     */
    appointmentCollectorTemplate?: template | ((data: { appointmentCount?: number, isCompact?: boolean }, collectorElement: dxElement) => string | Element | JQuery);
    /**
     */
    appointmentDragging?: {
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      autoScroll?: boolean,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      data?: any,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      group?: string,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      onAdd?: ((e: { component?: dxScheduler, event?: event, itemData?: any, itemElement?: dxElement, fromComponent?: dxSortable | dxDraggable, toComponent?: dxSortable | dxDraggable, fromData?: any, toData?: any }) => any),
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      onDragEnd?: ((e: { component?: dxScheduler, event?: event, cancel?: boolean, itemData?: any, itemElement?: dxElement, fromComponent?: dxSortable | dxDraggable, toComponent?: dxSortable | dxDraggable, fromData?: any, toData?: any }) => any),
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      onDragMove?: ((e: { component?: dxScheduler, event?: event, cancel?: boolean, itemData?: any, itemElement?: dxElement, fromComponent?: dxSortable | dxDraggable, toComponent?: dxSortable | dxDraggable, fromData?: any, toData?: any }) => any),
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      onDragStart?: ((e: { component?: dxScheduler, event?: event, cancel?: boolean, itemData?: any, itemElement?: dxElement, fromData?: any }) => any),
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      onRemove?: ((e: { component?: dxScheduler, event?: event, itemData?: any, itemElement?: dxElement, fromComponent?: dxSortable | dxDraggable, toComponent?: dxSortable | dxDraggable, fromData?: any }) => any),
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      scrollSensitivity?: number,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      scrollSpeed?: number
    };
    /**
     */
    appointmentTemplate?: template | ((model: { appointmentData?: any, targetedAppointmentData?: any }, itemIndex: number, contentElement: dxElement) => string | Element | JQuery);
    /**
     */
    appointmentTooltipTemplate?: template | ((model: { appointmentData?: any, targetedAppointmentData?: any }, itemIndex: number, contentElement: dxElement) => string | Element | JQuery);
    /**
     */
    cellDuration?: number;
    /**
     */
    crossScrollingEnabled?: boolean;
    /**
     */
    currentDate?: Date | number | string;
    /**
     */
    currentView?: 'agenda' | 'day' | 'month' | 'timelineDay' | 'timelineMonth' | 'timelineWeek' | 'timelineWorkWeek' | 'week' | 'workWeek';
    /**
     */
    customizeDateNavigatorText?: ((info: { startDate?: Date, endDate?: Date, text?: string }) => string);
    /**
     */
    dataCellTemplate?: template | ((itemData: any, itemIndex: number, itemElement: dxElement) => string | Element | JQuery);
    /**
     */
    dataSource?: string | Array<dxSchedulerAppointment> | DataSource | DataSourceOptions;
    /**
     */
    dateCellTemplate?: template | ((itemData: any, itemIndex: number, itemElement: dxElement) => string | Element | JQuery);
    /**
     */
    dateSerializationFormat?: string;
    /**
     */
    descriptionExpr?: string;
    /**
     * @deprecated
     */
    dropDownAppointmentTemplate?: template | ((itemData: any, itemIndex: number, contentElement: dxElement) => string | Element | JQuery);
    /**
     */
    editing?: boolean | {
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      allowAdding?: boolean,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      allowDeleting?: boolean,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      allowDragging?: boolean,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      allowResizing?: boolean,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      allowTimeZoneEditing?: boolean,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      allowUpdating?: boolean,
      /**
       * @deprecated
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      allowEditingTimeZones?: boolean
    };
    /**
     */
    endDateExpr?: string;
    /**
     */
    endDateTimeZoneExpr?: string;
    /**
     */
    endDayHour?: number;
    /**
     */
    firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
    /**
     */
    focusStateEnabled?: boolean;
    /**
     */
    groupByDate?: boolean;
    /**
     */
    groups?: Array<string>;
    /**
     */
    indicatorUpdateInterval?: number;
    /**
     */
    max?: Date | number | string;
    /**
     */
    maxAppointmentsPerCell?: number | 'auto' | 'unlimited';
    /**
     */
    min?: Date | number | string;
    /**
     */
    noDataText?: string;
    /**
     */
    onAppointmentAdded?: ((e: { component: dxScheduler, element: dxElement, model?: any, appointmentData: any, error?: Error }) => any);
    /**
     */
    onAppointmentAdding?: ((e: { component: dxScheduler, element: dxElement, model?: any, appointmentData: any, cancel: boolean | Promise<boolean> | JQueryPromise<boolean> }) => any);
    /**
     */
    onAppointmentClick?: ((e: { component: dxScheduler, element: dxElement, model?: any, appointmentData: any, targetedAppointmentData?: any, appointmentElement: dxElement, event?: event, cancel: boolean }) => any) | string;
    /**
     */
    onAppointmentContextMenu?: ((e: { component: dxScheduler, element: dxElement, model?: any, appointmentData: any, targetedAppointmentData?: any, appointmentElement: dxElement, event?: event }) => any) | string;
    /**
     */
    onAppointmentDblClick?: ((e: { component: dxScheduler, element: dxElement, model?: any, appointmentData: any, targetedAppointmentData?: any, appointmentElement: dxElement, event?: event, cancel: boolean }) => any) | string;
    /**
     */
    onAppointmentDeleted?: ((e: { component: dxScheduler, element: dxElement, model: any, appointmentData: any, error?: Error }) => any);
    /**
     */
    onAppointmentDeleting?: ((e: { component: dxScheduler, element: dxElement, model?: any, appointmentData: any, cancel: boolean | Promise<boolean> | JQueryPromise<boolean> }) => any);
    /**
     */
    onAppointmentFormOpening?: ((e: { component: dxScheduler, element: dxElement, model?: any, appointmentData?: any, form: dxForm, popup: dxPopup, cancel: boolean }) => any);
    /**
     */
    onAppointmentRendered?: ((e: { component: dxScheduler, element: dxElement, model: any, appointmentData: any, targetedAppointmentData?: any, appointmentElement?: dxElement }) => any);
    /**
     */
    onAppointmentUpdated?: ((e: { component: dxScheduler, element: dxElement, model?: any, appointmentData: any, error?: Error }) => any);
    /**
     */
    onAppointmentUpdating?: ((e: { component: dxScheduler, element: dxElement, model?: any, oldData?: any, newData?: any, cancel?: boolean | Promise<boolean> | JQueryPromise<boolean> }) => any);
    /**
     */
    onCellClick?: ((e: { component: dxScheduler, element: dxElement, model?: any, cellData: any, cellElement: dxElement, event?: event, cancel: boolean }) => any) | string;
    /**
     */
    onCellContextMenu?: ((e: { component: dxScheduler, element: dxElement, model?: any, cellData: any, cellElement: dxElement, event?: event }) => any) | string;
    /**
     */
    recurrenceEditMode?: 'dialog' | 'occurrence' | 'series';
    /**
     */
    recurrenceExceptionExpr?: string;
    /**
     */
    recurrenceRuleExpr?: string;
    /**
     */
    remoteFiltering?: boolean;
    /**
     */
    resourceCellTemplate?: template | ((itemData: any, itemIndex: number, itemElement: dxElement) => string | Element | JQuery);
    /**
     */
    resources?: Array<{
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      allowMultiple?: boolean,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      colorExpr?: string,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      dataSource?: string | Array<any> | DataSource | DataSourceOptions,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      displayExpr?: string | ((resource: any) => string),
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      fieldExpr?: string,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      label?: string,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      useColorAsDefault?: boolean,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      valueExpr?: string | Function
    }>;
    /**
     */
    scrolling?: dxSchedulerScrolling;
    /**
     */
    selectedCellData?: Array<any>;
    /**
     */
    shadeUntilCurrentTime?: boolean;
    /**
     */
    showAllDayPanel?: boolean;
    /**
     */
    showCurrentTimeIndicator?: boolean;
    /**
     */
    startDateExpr?: string;
    /**
     */
    startDateTimeZoneExpr?: string;
    /**
     */
    startDayHour?: number;
    /**
     */
    textExpr?: string;
    /**
     */
    timeCellTemplate?: template | ((itemData: any, itemIndex: number, itemElement: dxElement) => string | Element | JQuery);
    /**
     */
    timeZone?: string;
    /**
     */
    useDropDownViewSwitcher?: boolean;
    /**
     */
    views?: Array<'day' | 'week' | 'workWeek' | 'month' | 'timelineDay' | 'timelineWeek' | 'timelineWorkWeek' | 'timelineMonth' | 'agenda' | {
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      agendaDuration?: number,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      appointmentCollectorTemplate?: template | ((data: { appointmentCount?: number, isCompact?: boolean }, collectorElement: dxElement) => string | Element | JQuery),
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      appointmentTemplate?: template | ((model: { appointmentData?: any, targetedAppointmentData?: any }, itemIndex: number, contentElement: dxElement) => string | Element | JQuery),
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      appointmentTooltipTemplate?: template | ((model: { appointmentData?: any, targetedAppointmentData?: any }, itemIndex: number, contentElement: dxElement) => string | Element | JQuery),
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      cellDuration?: number,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      dataCellTemplate?: template | ((itemData: any, itemIndex: number, itemElement: dxElement) => string | Element | JQuery),
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      dateCellTemplate?: template | ((itemData: any, itemIndex: number, itemElement: dxElement) => string | Element | JQuery),
      /**
       * @deprecated
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      dropDownAppointmentTemplate?: template | ((itemData: any, itemIndex: number, contentElement: dxElement) => string | Element | JQuery),
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      endDayHour?: number,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      groupByDate?: boolean,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      groupOrientation?: 'horizontal' | 'vertical',
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      groups?: Array<string>,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      intervalCount?: number,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      maxAppointmentsPerCell?: number | 'auto' | 'unlimited',
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      name?: string,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      resourceCellTemplate?: template | ((itemData: any, itemIndex: number, itemElement: dxElement) => string | Element | JQuery),
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      startDate?: Date | number | string,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      startDayHour?: number,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      timeCellTemplate?: template | ((itemData: any, itemIndex: number, itemElement: dxElement) => string | Element | JQuery),
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      type?: 'agenda' | 'day' | 'month' | 'timelineDay' | 'timelineMonth' | 'timelineWeek' | 'timelineWorkWeek' | 'week' | 'workWeek',
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      scrolling?: dxSchedulerScrolling
    }>;
}
/**
 */
export default class dxScheduler extends Widget {
    constructor(element: Element, options?: dxSchedulerOptions)
    constructor(element: JQuery, options?: dxSchedulerOptions)
    /**
     */
    addAppointment(appointment: any): void;
    /**
     */
    deleteAppointment(appointment: any): void;
    getDataSource(): DataSource;
    /**
     */
    getEndViewDate(): Date;
    /**
     */
    getStartViewDate(): Date;
    /**
     */
    hideAppointmentPopup(saveChanges?: boolean): void;
    /**
     */
    hideAppointmentTooltip(): void;
    /**
     */
    scrollTo(date: Date, group?: object, allDay?: boolean): void;
    /**
     * @deprecated
     */
    scrollToTime(hours: number, minutes: number, date?: Date): void;
    /**
     */
    showAppointmentPopup(appointmentData?: any, createNewAppointment?: boolean, currentAppointmentData?: any): void;
    /**
     */
    showAppointmentTooltip(appointmentData: any, target: string | Element | JQuery, currentAppointmentData?: any): void;
    /**
     */
    updateAppointment(target: any, appointment: any): void;
}

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface dxSchedulerAppointment extends CollectionWidgetItem {
    /**
     */
    allDay?: boolean;
    /**
     */
    description?: string;
    /**
     */
    disabled?: boolean;
    /**
     */
    endDate?: Date;
    /**
     */
    endDateTimeZone?: string;
    /**
     */
    html?: string;
    /**
     */
    recurrenceException?: string;
    /**
     */
    recurrenceRule?: string;
    /**
     */
    startDate?: Date;
    /**
     */
    startDateTimeZone?: string;
    /**
     */
    template?: template;
    /**
     */
    text?: string;
    /**
     */
    visible?: boolean;
}

declare global {
interface JQuery {
    dxScheduler(): JQuery;
    dxScheduler(options: "instance"): dxScheduler;
    dxScheduler(options: string): any;
    dxScheduler(options: string, ...params: any[]): any;
    dxScheduler(options: dxSchedulerOptions): JQuery;
}
}
/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export type Options = dxSchedulerOptions;

/**
 */
export interface dxSchedulerScrolling {
  /**
   */
  mode?: 'standard' | 'virtual';
}

/** @deprecated use Options instead */
/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export type IOptions = dxSchedulerOptions;
