// @ts-nocheck
import { Observable } from "rxjs";
import { RecorderData, RecorderRequestQuery, GetRecordingDataResponse, GetRecordingsResponse, DeleteRecordingsResponse } from "../data/recorder-annotation.data.model";
import { RecorderEventTypesMap } from "../data/recorder-events.data.model";
import { RecordedData, RecorderQualityConstraints, RecorderEncodingOptions, RecorderDevicePermissionOptions } from "../data/recorder.model";

export declare class RecorderElement {

  initRecording: (type: string, panelId?: string) => any;

  /**
   * @deprecated Use on('recordingDone') method instead
   */
  onRecordedData: () => Observable<RecordedData | null>;

  /**
   * To enable recording countdown
   */
  enableRecordingCountdown: () => void;

  /**
   * To disable recording countdown
   */
  disableRecordingCountdown: () => void;

  /**
   * To get recording data by recorder id
   * @deprecated Use getRecordingData() method instead
   */
  getRecordingDataByRecorderId: (recorderId: string) => Observable<RecorderData | null>;

  /**
   * To enable recording transcription
   */
  enableRecordingTranscription: () => void;

  /**
   * To disable recording transcription
   */
  disableRecordingTranscription: () => void;

  /**
   * Subscribe to recorder actions
   */
  public on: <T extends keyof RecorderEventTypesMap>(action: T) => Observable<RecorderEventTypesMap[T]>;

  /**
   * @deprecated Use fetchRecordings() method instead
   */
  getRecordingData: (query: RecorderRequestQuery) => Promise<GetRecordingDataResponse>;

  /**
   * To enable video editor
   */
  enableVideoEditor: () => void;

  /**
   * To disable video editor
   */
  disableVideoEditor: () => void;

  /**
   * To get recordings
   */
  getRecordings: (query?: RecorderRequestQuery) => Observable<GetRecordingsResponse[]>;

  /**
   * To fetch recordings
   */
  fetchRecordings: (query?: RecorderRequestQuery) => Promise<GetRecordingsResponse[]>;

  /**
   * To delete recordings
   */
  deleteRecordings: (query?: RecorderRequestQuery) => Promise<DeleteRecordingsResponse[]>;

  /**
   * To set recording quality constraints
   */
  setRecordingQualityConstraints: (constraints: RecorderQualityConstraints) => void;

  /**
   * To set recording encoding options
   */
  setRecordingEncodingOptions: (options: RecorderEncodingOptions) => void;

  /**
   * To download latest video
   */
  downloadLatestVideo: (recorderId: string) => Promise<boolean>;

  /**
   * To enable recording mic
   */
  enableRecordingMic: () => void;

  /**
   * To disable recording mic
   */
  disableRecordingMic: () => void;

  /**
   * To enable onboarding tooltip
   */
  enableOnboardingTooltip: () => void;

  /**
   * To disable onboarding tooltip
   */
  disableOnboardingTooltip: () => void;

  /**
   * To enable retake on video editor
   */
  enableRetakeOnVideoEditor: () => void;

  /**
   * To disable retake on video editor
   */
  disableRetakeOnVideoEditor: () => void;

  /**
   * To ask device permission
   */
  askDevicePermission: (options: RecorderDevicePermissionOptions) => void;

  /**
   * To set max length
   */
  setMaxLength: (seconds: number) => void;

  /**
   * To open picture in picture
   */
  openPictureInPicture: () => Promise<void>;

  /**
   * To exit picture in picture
   */
  exitPictureInPicture: () => Promise<void>;

  /**
   * To request screen permission
   */
  requestScreenPermission: () => Promise<MediaStream | null>;

  /**
   * To enable picture in picture
   */
  enablePictureInPicture: () => void;

  /**
   * To disable picture in picture
   */
  disablePictureInPicture: () => void;

  /**
   * To enable playback on preview click
   */
  enablePlaybackOnPreviewClick: () => void;

  /**
   * To disable playback on preview click
   */
  disablePlaybackOnPreviewClick: () => void;

  constructor();

  private _initRecording;

  /**
   * @deprecated Use on('recordingDone') method instead
   */
  private _onRecordedData;

  /**
   * To enable dark mode in comments
   */
  private _enableRecordingCountdown;

  /**
   * To disable dark mode in comments
   */
  private _disableRecordingCountdown;

  /**
   * To get recording data by recorder id
   * @deprecated Use getRecordingData() method instead
   */
  private _getRecordingDataByRecorderId;

  /**
   * To enable recording transcription
   */
  private _enableRecordingTranscription;

  /**
   * To disable recording transcription
   */
  private _disableRecordingTranscription;

  /**
   * Subscribe to recorder actions
   */
  private _on;

  /**
   * To get recording data by recorder ids
   */
  private _getRecordingData;

  /**
   * To enable video editor
   */
  private _enableVideoEditor;

  /**
   * To disable video editor
   */
  private _disableVideoEditor;

  /**
   * To get recordings
   */
  private _getRecordings;

  /**
   * To fetch recordings
   */
  private _fetchRecordings;

  /**
   * To delete recordings
   */
  private _deleteRecordings;

  /**
   * To set recording quality constraints
   */
  private _setRecordingQualityConstraints;

  /**
   * To set recording encoding options
   */
  private _setRecordingEncodingOptions;

  /**
   * To download latest video
   */
  private _downloadLatestVideo;

  /**
   * To enable recording mic
   */
  private _enableRecordingMic;

  /**
   * To disable recording mic
   */
  private _disableRecordingMic;

  /**
   * To enable onboarding tooltip
   */
  private _enableOnboardingTooltip;

  /**
   * To disable onboarding tooltip
   */
  private _disableOnboardingTooltip;

  /**
   * To enable retake on video editor
   */
  private _enableRetakeOnVideoEditor;

  /**
   * To disable retake on video editor
   */
  private _disableRetakeOnVideoEditor;

  /**
   * To ask device permission
   */
  private _askDevicePermission;

  /**
   * To set max length
   */
  private _setMaxLength;

  /**
   * To open picture in picture
   */
  private _openPictureInPicture;

  /**
   * To exit picture in picture
   */
  private _exitPictureInPicture;

  /**
   * To request screen permission
   */
  private _requestScreenPermission;

  /**
   * To enable picture in picture
   */
  private _enablePictureInPicture;

  /**
   * To disable picture in picture
   */
  private _disablePictureInPicture;

  /**
   * To enable playback on preview click
   */
  private _enablePlaybackOnPreviewClick;

  /**
   * To disable playback on preview click
   */
  private _disablePlaybackOnPreviewClick;
}
