import { Component } from 'vue'; import { Product, ProductSortField, SortOrder, Cart, CartMainItem, Contact, Customer, GraphQLClient } from '@propeller-commerce/propeller-sdk-v2'; /** * The controlled listing state for the spare-parts view — mirrors what the host * derives from the URL (`page`/`offset`/`sort`/attribute-`filters`/`price`/`term`). * Primitives + SDK enums only, so no app type leaks into the package. */ export interface MachineListingState { page: number; offset: number; sortField: ProductSortField | string; sortOrder: SortOrder | string; /** Attribute name → selected facet values. */ filters: Record; minPrice?: number; maxPrice?: number; term: string; } export interface MachineGridProps { /** Current URL path under the machines root, e.g. `['mixer','frame']`. `[]` = root. */ segments: string[]; /** Localized machines base path (e.g. `/nl/machines`) — used to build hrefs. */ basePath: string; /** External system the installation ids belong to (root mode). */ source?: string; /** Installation ids from `MY_INSTALLATIONS` (root mode). */ sourceIds?: string[]; /** Title for the root list. Defaults to `'Machines'`. */ rootTitle?: string; /** Language the machine tree is authored in (usually EN). Defaults to `'EN'`. */ machineLanguage?: string; /** * Other languages the tree may be authored in, tried in order when a slug * does not resolve in `machineLanguage`. * * A slug resolves only in its own language, so a half-translated tree lists a * machine by its NL slug and then cannot open it with `language: 'EN'`. Pass * the shop's locales here; `machineLanguage` and the storefront `language` * are always tried first (PWP-993). */ machineLanguages?: string[]; listing: MachineListingState; onListingChange: (next: MachineListingState) => void; graphqlClient?: GraphQLClient; user?: Contact | Customer | null; companyId?: number; /** Storefront language (parts). */ language?: string; taxZone?: string; configuration?: { imageSearchFiltersGrid?: unknown; imageVariantFiltersMedium?: unknown; }; portalMode?: string; cartId?: string; createCart?: boolean; onCartCreated?: (cart: Cart) => void; /** * Fired after every successful add-to-cart (adds into an EXISTING cart too, * not just the first create). Forward to the host cart store or the cart * icon/sidebar/page won't reflect parts added from the grid. */ afterAddToCart?: (cart: Cart, item?: CartMainItem) => void; allowAddToCart?: boolean; showPrice?: boolean; showStock?: boolean; showAvailability?: boolean; onProductClick?: (product: Product) => void; /** * Custom card for the PARTS list, forwarded to the inner ProductGrid. Without * it the same product looked different depending on the page it was reached * from (PWP-995c). */ productCardComponent?: Component; paginationLabels?: Record; filtersLabels?: Record; toolbarLabels?: Record; /** * Labels for the machine side of the grid. * * Keys read here: `loading`, `noMachines`, `machineNotFound`, * `quantityInMachine` and `searchParts`. The same object is passed to each * `MachineCard` as its `labels`, which reads `viewMachine` — so all six keys * belong in it (PWP-995d). * * `quantityInMachine` and `searchParts` used to be read from `toolbarLabels`, * which is forwarded verbatim to `GridToolbar`: a shop that translated its * toolbar dictionary properly still got "Qty in machine" and "Search parts…" * in English, because those keys belong to no toolbar (PWP-995a). They are * still read from `toolbarLabels` as a fallback so existing hosts keep * working. */ machineCardLabels?: Record; /** * Labels for the PARTS list, forwarded verbatim to the inner ProductGrid and * the components it embeds. * * MachineGrid used to forward none of these and expose no way to reach them, * so a translated storefront rendered "In stock", "Add" and "Search parts…" * in English in the middle of its own copy (PWP-995a). */ productCardLabels?: Record; addToCartLabels?: Record; stockLabels?: Record; priceLabels?: Record; labels?: Record; className?: string; } declare const _default: import('vue').DefineComponent & Readonly<{}>, { showPrice: boolean; showStock: boolean; showAvailability: boolean; allowAddToCart: boolean; createCart: boolean; }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>; export default _default;