import type { HydrogenProduct } from "./types";
/**
 * Swap map describing which CSS selectors inside the harvested card template
 * hold each product datum. Matches the shape the server returns in
 * boot config as `themeHarvest.swapMap`.
 */
export interface SwapMap {
    image: {
        /** CSS selector for the <img> element. */
        selector: string;
        /** Additional attribute names to clear/set beyond src (e.g. ["data-src"]). */
        attrs?: string[];
        /** Alternate selector for a second image node (optional). */
        altSelector?: string;
    };
    title: {
        /** CSS selector for the element whose textContent holds the product title. */
        selector: string;
    };
    link: {
        /**
         * CSS selector whose matching nodes all get their href rewritten to
         * /products/<handle>. Use querySelectorAll so every <a> on the card
         * (image link, title link, card wrapper) is updated.
         */
        selector: string;
    };
    price: {
        /** CSS selector for the price display node. textContent is replaced. */
        selector: string;
    };
    /**
     * Selects the /cart/add <form> and the hidden variant id input.
     * Null for link-only surfaces (e.g. predictive search rows) that carry no
     * add-to-cart form — the form swap step is skipped when this is null.
     */
    form: {
        /** CSS selector for the <form action="/cart/add"> element. */
        selector: string;
        /** CSS selector (relative to form) for the hidden variant id input ([name=id]). */
        variantInput: string;
        /**
         * Optional CSS selector for a node that carries the product id
         * (e.g. "[data-product-id]"). Its value attribute and data-product-id
         * attribute are set to the numeric product id when present.
         */
        productId?: string;
    } | null;
}
/**
 * Format a price using the merchant's Shopify money_format template string.
 *
 * The template uses Shopify's standard placeholders:
 *   {{amount}}                              — decimal, 2 places, thousands comma (e.g. 8,475.00)
 *   {{amount_no_decimals}}                  — integer, thousands comma (e.g. 8,475)
 *   {{amount_with_comma_separator}}         — decimal, 2 places, European (e.g. 8.475,00)
 *   {{amount_no_decimals_with_comma_separator}} — integer, European (e.g. 8.475)
 *   {{amount_with_apostrophe_separator}}    — decimal, 2 places, Swiss (e.g. 8'475.00)
 *
 * IMPORTANT: amountMajorUnits is in major currency units (e.g. "8475.00"),
 * NOT in cents. Shopify's own JS divides by 100, but our Storefront MoneyV2
 * amount is already in major units — do NOT divide.
 */
export declare function formatMoneyTemplate(amountMajorUnits: string, moneyFormat: string): string;
/**
 * Clone `cardTemplateHtml`, swap product data into the theme's own slots per
 * `swapMap`, and return the swapped card's `outerHTML`.
 *
 * When `moneyFormat` is a non-empty string the price node is formatted via
 * `formatMoneyTemplate` using the merchant's Shopify money_format template
 * (e.g. "₹{{amount}}", "${{amount_no_decimals}}"). When absent or empty the
 * existing Intl.NumberFormat path is used as a fallback.
 *
 * Throws when a required selector is missing so the caller can fall back to
 * the generic Seekora card for that item.
 */
export declare function swapCardHtml(cardTemplateHtml: string, swapMap: SwapMap, product: HydrogenProduct, moneyFormat?: string): string;
/**
 * Clone `chipTemplateHtml`, swap the query term into the text node(s) and
 * rewrite the anchor href(s) to `/search?q=<encoded term>`.
 *
 * Throws when a required selector matches nothing so the caller can fall back
 * to the generic SuggestionList.
 */
export declare function swapChipHtml(chipTemplateHtml: string, chipSwap: {
    text: string;
    link: string;
}, term: string): string;
//# sourceMappingURL=swap.d.ts.map