import { Component } from 'vue'; import { GraphQLClient, Cart, Product, Contact, Customer } from '@propeller-commerce/propeller-sdk-v2'; export interface ProductInfoProps { /** The authenticated user (Contact or Customer). Resolved from PropellerProvider when omitted. */ user?: Contact | Customer | null; /** Active company ID from the company switcher. * Overrides default company for price calculation. * Triggers a re-fetch when changed. */ companyId?: number; /** * Scope the product fetch to specific orderlist IDs (e.g. a chosen B2B * contract). Overrides the default resolution of all the company's orderlists. */ orderlistIds?: number[]; /** * Apply the orderlist filter. Defaults to `true`; set `false` to browse * unscoped (full catalogue) for an authenticated user without a contract. */ applyOrderlists?: boolean; /** * Pre-fetched product object to display. * When provided the component skips internal fetching. */ product?: Product; /** * Product ID to fetch data for when no `product` prop is provided. * Requires `graphqlClient` to be set. */ productId?: number; /** * Initialised Propeller SDK GraphQL client. * Required when `productId` is provided for internal data fetching. */ graphqlClient?: GraphQLClient; /** * Image search filter passed to ProductService.getProduct(). * Controls how many image items are returned. * Example: { page: 1, offset: 20 } */ imageSearchFilters?: any; /** * Image variant transformation filter passed to ProductService.getProduct(). * Controls image size/format variants returned with the product. * Example: imageVariantFiltersLarge from @/data/defaults * Defaults to { transformations: [] } when omitted. */ imageVariantFilters?: any; /** * Tax zone to use for price calculation. */ taxZone?: string; /** * Called once the product data is loaded — either immediately (when * `product` prop is supplied) or after the internal fetch completes. * Use this to hydrate sibling components (gallery, price, descriptions, etc.). */ onProductLoaded?: (product: Product) => void; /** Show the product name. Defaults to true. */ showTitle?: boolean; /** Show the product SKU. Defaults to true. */ showSku?: boolean; /** Language code used to resolve localised names. Defaults to 'NL'. */ language?: string; /** Extra CSS class applied to the root element. */ className?: string; /** * Config object providing imageSearchFiltersGrid and imageVariantFiltersSmall. */ configuration?: any; /** * Attribute codes/names to look up and display as badge overlays on the product image. * Each code is resolved against `product.attributes.items[].attributeDescription.code` * (or `.name`). Attributes with no matching value are silently omitted. * Example: ['new', 'sale'] */ imageLabels?: string[]; /** * Attribute codes/names to look up and display as extra text rows below the product name. * Resolved the same way as `imageLabels`. * Example: ['brand', 'color'] */ textLabels?: string[]; showImage?: boolean; showBadges?: boolean; showFavorite?: boolean; showPrice?: boolean; showStock?: boolean; showAddToCart?: boolean; /** * Portal access mode. In `'semi-closed'` price, stock and add-to-cart are * withheld from anonymous visitors, who get a log-in action instead. */ portalMode?: string; /** * Whether a session exists, independent of whether `user` has loaded yet. * Passed down alongside `portalMode`; closes the hydration window in which * an authenticated visitor still has a null `user`. */ isAuthenticated?: boolean; /** * Invoked when an anonymous visitor clicks the log-in action that replaces * add-to-cart in a semi-closed portal. The host owns navigation. */ onLoginClick?: () => void; showBundles?: boolean; showBulkPrices?: boolean; showSurcharges?: boolean; imageComponent?: Component; badgesComponent?: Component; /** Cart to add into. Omit and pass `createCart` to start one on first add. */ cartId?: string; /** If true a new cart is created when no `cartId` is available. */ createCart?: boolean; /** * Called when a new cart is created, so the host can persist `cart.cartId`. * WARNING: without it a new cart is created on every add. */ onCartCreated?: (cart: Cart) => void; favoriteComponent?: Component; priceComponent?: Component; stockComponent?: Component; addToCartComponent?: Component; bundlesComponent?: Component; bulkPricesComponent?: Component; surchargesComponent?: Component; includeTax?: boolean; currency?: string; /** * Override any UI string. * Forwarded down to nested default components in the new shell. */ labels?: Record; } declare function __VLS_template(): { attrs: Partial<{}>; slots: { beforeContent?(_: { product: Product | null; }): any; image?(_: { product: Product; language: string | undefined; imageSearchFilters: any; imageVariantFilters: any; }): any; badges?(_: { product: Product; labels: Record | undefined; }): any; title?(_: { product: Product | null; name: string; }): any; sku?(_: { product: Product | null; sku: string; }): any; favorite?(_: { product: Product; user: Contact | Customer | null | undefined; }): any; price?(_: { product: Product; price: import('@propeller-commerce/propeller-sdk-v2').ProductPrice; includeTax: boolean | undefined; currency: string | undefined; labels: Record | undefined; }): any; stock?(_: { product: Product; inventory: import('@propeller-commerce/propeller-sdk-v2').ProductInventory; showStock: boolean; showAvailability: boolean; labels: Record | undefined; }): any; addToCart?(_: { product: Product; cartId: string | undefined; labels: Record | undefined; }): any; bundles?(_: { product: Product; labels: Record | undefined; }): any; bulkPrices?(_: { product: Product; bulkPrices: import('@propeller-commerce/propeller-sdk-v2').ProductPrice[]; includeTax: boolean | undefined; labels: Record | undefined; }): any; surcharges?(_: { product: Product; includeTax: boolean | undefined; labels: Record | undefined; }): any; afterContent?(_: { product: Product | null; }): any; }; refs: {}; rootEl: any; }; type __VLS_TemplateResult = ReturnType; declare const __VLS_component: import('vue').DefineComponent & Readonly<{}>, { showSku: boolean; showTitle: boolean; }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>; declare const _default: __VLS_WithTemplateSlots; export default _default; type __VLS_WithTemplateSlots = T & { new (): { $slots: S; }; };