/**
 * Provides a utility function to determine whether a graphic's origin is a [CatalogGraphicOrigin](https://developers.arcgis.com/javascript/latest/api-reference/esri-graphic-CatalogGraphicOrigin.html).
 *
 * @since 5.0
 * @example
 * // Use hitTest() to get a graphic, then check whether it originated from a CatalogLayer.
 * view.hitTest(screenPoint).then((response) => {
 *   const graphic = response.results[0]?.graphic;
 *   if (!graphic) {
 *     return;
 *   }
 *   if (isCatalogGraphicOrigin(graphic.origin)) {
 *     // hitTest returned a graphic from a CatalogGraphicOrigin.
 *     // Use this info for your processing logic.
 *   } else {
 *     console.log("graphic's origin is NOT a CatalogLayer");
 *   }
 * });
 */
import type CatalogGraphicOrigin from "./CatalogGraphicOrigin.js";
import type GraphicOrigin from "./GraphicOrigin.js";

/**
 * Utility function that determines whether a graphic’s origin is a [CatalogGraphicOrigin](https://developers.arcgis.com/javascript/latest/api-reference/esri-graphic-CatalogGraphicOrigin.html).
 *
 * @param origin - The graphic origin to check.
 * @returns Returns `true` if the graphic origin is of type [CatalogGraphicOrigin](https://developers.arcgis.com/javascript/latest/api-reference/esri-graphic-CatalogGraphicOrigin.html), `false` otherwise.
 */
export function isCatalogGraphicOrigin(origin: GraphicOrigin | null | undefined): origin is CatalogGraphicOrigin;