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

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