import React from 'react'; import type { LineItem } from '@wix/headless-ecom/services'; /** * Props for CmsActions.BuyNow component */ export interface BuyNowProps extends Omit, 'children'> { /** When true, the component will not render its own element but forward its props to its child */ asChild?: boolean; /** * Content to render inside the button. * Can be static content or a render function for custom behavior. */ children?: React.ReactNode | React.ForwardRefRenderFunction Promise; /** Line items that will be processed */ lineItems: LineItem[]; /** Error message if any */ error?: string | null; }>; /** Text or content to display when not loading */ label?: string | React.ReactNode; /** Text or content to display when loading */ loadingState?: string | React.ReactNode; /** The catalog item ID to purchase */ itemId: string; /** The collection ID for the catalog reference */ collectionId: string; /** Additional disabled state (combined with loading state) */ disabled?: boolean; /** Quantity to purchase (defaults to 1) */ quantity?: number; } /** * Buy Now action button component for CMS items. * Creates line items directly from props and uses Commerce.Actions.BuyNow for purchase. * Uses the CMS_APP_ID constant for the catalog reference. * * @component * @example * ```tsx * * * // With custom rendering * * {({ isLoading, onClick, disabled }, ref) => ( * * )} * * ``` */ export declare const BuyNow: React.ForwardRefExoticComponent>; /** * Props for CmsActions.AddToCart component */ export interface AddToCartProps extends Omit, 'children'> { /** When true, the component will not render its own element but forward its props to its child */ asChild?: boolean; /** * Content to render inside the button. * Can be static content or a render function for custom behavior. */ children?: React.ReactNode | React.ForwardRefRenderFunction Promise; /** Line items that will be processed */ lineItems: LineItem[]; /** Error message if any */ error?: string | null; }>; /** Text or content to display when not loading */ label?: string | React.ReactNode; /** Text or content to display when loading */ loadingState?: string | React.ReactNode; /** The catalog item ID to add to cart */ itemId: string; /** The collection ID for the catalog reference */ collectionId: string; /** Additional disabled state (combined with loading state) */ disabled?: boolean; /** Quantity to add (defaults to 1) */ quantity?: number; } /** * Add to Cart action button component for CMS items. * Creates line items directly from props and uses Commerce.Actions.AddToCart. * Uses the CMS_APP_ID constant for the catalog reference. * * @component * @example * ```tsx * * * // With custom rendering * * {({ isLoading, onClick, disabled }, ref) => ( * * )} * * ``` */ export declare const AddToCart: React.ForwardRefExoticComponent>;