import type { UserSettings } from "../../views/types.js";

/** Specifies how bookmarks will be created or modified. */
export interface BookmarkOptions {
  /**
   * _Since 4.17_ Indicates whether the rotation of the current view will be saved in the
   *    [Bookmark#viewpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-Bookmark.html#viewpoint) of a newly created or modified bookmark. Default is `true`.
   */
  captureRotation?: boolean;
  /**
   * _Since 4.17_ Indicates whether the scale of the current view will be saved in the
   *    [Bookmark#viewpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-Bookmark.html#viewpoint) of a newly created or modified bookmark. Default is `true`.
   */
  captureScale?: boolean;
  /**
   * _Since 4.22_ Indicates whether the time extent of the current view will be saved in the
   *    [Bookmark#timeExtent](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-Bookmark.html#timeExtent) of a newly created or modified bookmark. Default is `true`.
   */
  captureTimeExtent?: boolean;
  /**
   * _Since 4.17_ Indicates whether the viewpoint of the current view will become the
   *    [Bookmark#viewpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-Bookmark.html#viewpoint) of a newly created or modified bookmark. Default is `true`.
   */
  captureViewpoint?: boolean;
  /**
   * An object that specifies the settings of the screenshot that will be used to create the bookmark's
   *    [Bookmark#thumbnail](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-Bookmark.html#thumbnail).
   *  The default screenshot size is 128px x 128px.
   */
  screenshotSettings?: Partial<UserSettings>;
  /**
   * Indicates whether a screenshot is taken when a new bookmark is created.
   *    The screenshot will be set as the [Bookmark#thumbnail](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-Bookmark.html#thumbnail) in the newly created bookmark. Default is `true`.
   */
  takeScreenshot?: boolean;
}

/** Specifies the abilities for the Bookmarks widget. */
export interface BookmarksCapabilities {
  /**
   * Indicates whether the time capability is enabled in the Bookmarks widget. Default is `true`.
   * When `false`, the timeExtent of a bookmark will not be visible or editable. Any newly created bookmarks will not capture the time extent.
   */
  time?: boolean;
}