import { Component } from 'vue'; import { CartChildItemInput, GraphQLClient, Product, Cart, Contact, Customer, TransformationsInput, MediaImageProductSearchInput, CartMainItem, Cluster } from '@propeller-commerce/propeller-sdk-v2'; export interface AddToCartProps { /** GraphQL client for the Propeller SDK. Resolved from PropellerProvider when omitted. */ graphqlClient?: GraphQLClient; /** The authenticated user (Contact or Customer). Resolved from PropellerProvider when omitted. */ user?: Contact | Customer | null; /** The product to be added to cart */ product: Product; /** Currency symbol to display. Defaults to '€'. */ currency?: string; /** Cart ID — required when onAddToCart is not provided */ cartId?: string; /** The cluster to be added to cart */ cluster?: Cluster; /** IDs of the cluster child items, e.g. cluster options */ childItems?: number[]; /** Called before adding to cart. Return false to abort (e.g. failed validation). */ beforeAddToCart?: () => boolean; /** Notes for the cart item */ notes?: string; /** Custom price for the product (overrides calculated price) */ price?: number; /** Label overrides for UI strings * * available labels: * - outOfStock * - noCartId * - errorAdding * - addedToCart * - modalTitle * - quantity * - continueShopping * - proceedToCheckout * - requestQuoteButton * - add * - adding */ labels?: Record; /** * If true a new cart is created if no cart ID is provided. * Defaults to false. */ createCart?: boolean; /** * Callback to handle a new cart being created. * WARNING: If not provided the component create new carts on every add-to-cart. */ onCartCreated?: (cart: Cart) => void; /** * Callback to handle adding the product to cart. * If not provided the component calls CartService.addItemToCart internally. */ onAddToCart?: (product: Product, clusterId?: number, quantity?: number, childItems?: CartChildItemInput[], notes?: string, price?: number, showModal?: boolean) => Cart; /** * Callback triggered after adding the product to cart. */ /** * Labels for the bonus-items block in the success modal. * Keys: `title` ('Bonus items'), `sku` ('SKU'). */ bonusItemsLabels?: Record; afterAddToCart?: (cart: Cart, item?: CartMainItem) => void; /** * When true a modal popup is shown after a successful add-to-cart * with buttons to continue shopping or proceed to checkout. * Defaults to false (only a brief inline success message is shown). */ showModal?: boolean; /** * Renders − and + buttons beside the quantity input. * Defaults to true. */ allowIncrDecr?: boolean; /** * Validates available stock via InventoryService before adding. * Defaults to false. */ enableStockValidation?: boolean; /** Language code passed to CartService operations. Defaults to 'en'. */ language?: string; /** Additional CSS class for the root element */ className?: string; /** Callback fired when the "Proceed to checkout" modal button is clicked */ onProceedToCheckout?: () => void; /** Callback fired when the "Request a Quote" modal button is clicked */ onRequestQuoteClick?: (cart: Cart) => void; /** Configuration object passed to the component */ configuration?: { language?: string; imageSearchFiltersGrid?: MediaImageProductSearchInput; imageVariantFiltersSmall?: TransformationsInput; urls?: { getProductUrl: (product: Product, language?: string) => string; }; }; /** Active company ID from the company switcher. Overrides user's default company for cart creation and lookup. */ companyId?: number; /** * When true, tax-inclusive price (net) is shown. * When false, tax-exclusive price (gross) is shown. * Defaults to false. */ includeTax?: boolean; priceComponent?: Component; stockComponent?: Component; } /** * Cart query variables interface Variables for the cart query */ /** * Cart query variables interface Variables for the cart query */ export interface CartQueryVariables { /** Cart ID to fetch */ cartId: string; /** Language for localized content */ language: string; /** Image search filters */ imageSearchFilters: MediaImageProductSearchInput; /** Image transformation filters */ imageVariantFilters: TransformationsInput; } declare const _default: import('vue').DefineComponent & Readonly<{}>, { allowIncrDecr: boolean; }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>; export default _default;