import PortalItem from "@arcgis/core/portal/PortalItem";
import { PortalUri } from "../PortalUri.js";
import type { ItemJson } from "../json/ItemJson.js";
import { Uri } from "./uri.js";
/**
 * An ID that uniquely identifies an item in Portal/AGOL.
 */
export type PortalItemId = string;
/**
 * A URL pointing to an item in Portal.
 */
export type PortalItemUrl = string;
/**
 * A reference to a portal item.
 */
export type PortalItemLike = PortalItem | ItemJson | PortalItemId | PortalItemUrl | PortalUri | Uri;
/**
 * Determines whether the input is a valid Portal item ID.
 *
 * @param input The input to check.
 */
export declare function isPortalItemId(input: string): boolean;
/**
 * Returns the friendly portal item URL from a portal item like object. If the
 * item doesn't have an ID, or a portal URL, undefined is returned.
 *
 * @param itemLike PortalItem.
 */
export declare function getPortalItemHtmlUrl(itemLike: PortalItemLike): string | undefined;
/**
 * Determines whether the input is a valid URL to a Portal item.
 *
 * @param input The input to check.
 */
export declare function isPortalItemUrl(input: string | Uri): boolean;
/**
 * Determines whether the input can be interpreted as a reference to a Portal
 * item, i.e. whether it can be converted by {@link toPortalItem()}.
 *
 * @param input The value to test.
 */
export declare function isPortalItemLike(input: unknown): input is PortalItemLike;
/**
 * Converts the input to a PortalItem object.
 *
 * @param input The input to convert.
 * @throws ArgumentError - If the input can't be converted. Use
 *   {@link isPortalItemLike()} to determine if the input can be converted if the
 *   input is unknown.
 */
export declare function toPortalItem(input: PortalItemLike): PortalItem;
/**
 * Converts a portal item reference to its serializable representation.
 *
 * @param input The input to convert.
 */
export declare function serializePortalItem(input: PortalItemLike): ItemJson | string;
