import type * as React from "react";
/**
 * Product shape consumed by theme-native card renderers (Section 16 of the
 * Hydrogen React Foundation spec). Adapted from the search-result document,
 * which the Shopify connector v2 syncs in Storefront-API-aligned shape:
 * GID id, priceRange (MoneyV2), featuredImage, media, variants.
 *
 * Field names mirror what hydrogen-react's <Image> and <Money> consume
 * directly, so theme card components can pass these through with no glue.
 */
export interface HydrogenMoneyV2 {
    amount: string;
    currencyCode: string;
}
export interface HydrogenImageData {
    url: string;
    altText?: string | null;
    width?: number | null;
    height?: number | null;
}
/**
 * A single product variant, adapted from the flattened connector sync shape
 * (RelayConnectionFlatten). The `id` is the full GID; card helpers parse the
 * numeric suffix at add-to-cart time for Shopify's AJAX Cart API.
 */
export interface HydrogenVariant {
    /** Full GID, e.g. gid://shopify/ProductVariant/123 */
    id: string;
    /** Variant title, e.g. "Red / Large". */
    title?: string;
    /** Whether this variant is available for purchase. */
    availableForSale: boolean;
    /** Variant price as a MoneyV2 object (amount is a plain decimal string). */
    price?: HydrogenMoneyV2;
    /** Selected option name/value pairs, e.g. [{name:"Color",value:"Red"}]. */
    selectedOptions?: {
        name: string;
        value: string;
    }[];
}
export interface HydrogenProduct {
    /** Full GID, e.g. gid://shopify/Product/123 */
    id: string;
    handle: string;
    title: string;
    vendor?: string;
    featuredImage?: HydrogenImageData | null;
    priceRange: {
        minVariantPrice: HydrogenMoneyV2;
        maxVariantPrice?: HydrogenMoneyV2;
    };
    compareAtPriceRange?: {
        minVariantCompareAtPrice?: HydrogenMoneyV2 | null;
    };
    /**
     * Flattened variant list from the connector sync. Undefined when the
     * document contains no variant data (e.g. older index documents).
     */
    variants?: HydrogenVariant[];
    /**
     * True if at least one variant is available for sale. Undefined when no
     * variant data is present (cards should treat undefined as available).
     */
    availableForSale?: boolean;
}
/** Storefront surface a theme card targets. */
export type ThemeCardSurface = "productCard" | "predictiveItem" | "collectionCard";
/** A single card renderer. Receives one adapted product plus its grid index. */
export type CardRenderer = React.FC<{
    product: HydrogenProduct;
    index: number;
}>;
/** The set of surface renderers a theme provides. Only productCard is required. */
export interface ThemeCardSet {
    productCard: CardRenderer;
    predictiveItem?: CardRenderer;
    collectionCard?: CardRenderer;
}
//# sourceMappingURL=types.d.ts.map