import type Viewpoint from "../Viewpoint.js";
import type TimeExtent from "../time/TimeExtent.js";
import type SlideThumbnail from "../webdoc/support/SlideThumbnail.js";
import type { IdentifiableMixin, IdentifiableMixinProperties } from "../core/Identifiable.js";
import type { JSONSupport, JSONSupportMixinProperties } from "../core/JSONSupport.js";
import type { SlideThumbnailProperties } from "../webdoc/support/SlideThumbnail.js";
import type { TimeExtentProperties } from "../time/TimeExtent.js";
import type { ViewpointProperties } from "../Viewpoint.js";

export interface BookmarkProperties extends JSONSupportMixinProperties, IdentifiableMixinProperties, Partial<Pick<Bookmark, "name">> {
  /** The URL for a thumbnail image. */
  thumbnail?: SlideThumbnailProperties | null;
  /**
   * The time extent of the bookmark item.
   *
   * @since 4.22
   * @example
   * // create a bookmark with a time extent starting December 10, 1996
   * //   and ending December 25, 1996
   * const bookmark = new Bookmark({
   *    timeExtent: {
   *      start: new Date(1996, 11, 10),
   *      end: new Date(1996, 11, 25)
   *    }
   * })
   */
  timeExtent?: TimeExtentProperties | null;
  /**
   * The viewpoint of the bookmark item. Defines the rotation, scale, and target geometry of the bookmark.
   *
   * Bookmarks can only be [saved to the WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html#save) when their `viewpoint.targetGeometry` is an [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html).
   * When defined manually on the [Bookmarks](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html) widget, the `targetGeometry` can be a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), but `scale` must also be defined.
   *
   * @since 4.17
   */
  viewpoint?: ViewpointProperties;
}

/**
 * A bookmark is a saved map extent that allows end users to quickly navigate to a particular area of interest
 * using the [Bookmarks](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html) widget.
 * They are usually defined part of the [WebMap#bookmarks](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html#bookmarks).
 *
 * @since 4.8
 * @see [Bookmarks](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html) widget
 * @see [Bookmarks](https://developers.arcgis.com/web-map-specification/objects/bookmark/) in the Web Map specification
 */
export default class Bookmark extends BookmarkSuperclass {
  constructor(properties?: BookmarkProperties);
  /** The name of the bookmark item. Used as a label in the [Bookmarks](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html) widget. */
  accessor name: string;
  /** The URL for a thumbnail image. */
  get thumbnail(): SlideThumbnail | null | undefined;
  set thumbnail(value: SlideThumbnailProperties | null | undefined);
  /**
   * The time extent of the bookmark item.
   *
   * @since 4.22
   * @example
   * // create a bookmark with a time extent starting December 10, 1996
   * //   and ending December 25, 1996
   * const bookmark = new Bookmark({
   *    timeExtent: {
   *      start: new Date(1996, 11, 10),
   *      end: new Date(1996, 11, 25)
   *    }
   * })
   */
  get timeExtent(): TimeExtent | null | undefined;
  set timeExtent(value: TimeExtentProperties | null | undefined);
  /**
   * The viewpoint of the bookmark item. Defines the rotation, scale, and target geometry of the bookmark.
   *
   * Bookmarks can only be [saved to the WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html#save) when their `viewpoint.targetGeometry` is an [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html).
   * When defined manually on the [Bookmarks](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html) widget, the `targetGeometry` can be a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), but `scale` must also be defined.
   *
   * @since 4.17
   */
  get viewpoint(): Viewpoint;
  set viewpoint(value: ViewpointProperties);
  /**
   * Creates a deep clone of the Bookmark.
   *
   * @returns A deep clone of the [Bookmark](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-Bookmark.html) instance.
   * @since 4.12
   */
  clone(): Bookmark;
}
declare const BookmarkSuperclass: typeof JSONSupport & typeof IdentifiableMixin