import type { GroupedEntriesAdapted, ProductEntity } from '../../entities/types/index.js'; import type { SizeAdapted, SizesAdapted } from '../../helpers/adapters/index.js'; import type { StoreState } from '../../types/index.js'; /** * Returns the error given by product actions. * * @param state - Application state. * @param id - Product id. * * @returns Product details error. */ export declare const getProductError: (state: StoreState, id: ProductEntity['id']) => import("@farfetch/blackout-client").BlackoutError | undefined; /** * Returns the hydrated condition from product details. * * @param state - Application state. * @param id - Product id. * * @returns If a certain product is hydrated or not. */ export declare const isProductHydrated: (state: StoreState, id: ProductEntity['id']) => boolean | undefined; /** * Returns the loading condition from product details. * * @param state - Application state. * @param id - Product id. * * @returns If a certain product is loading or not. */ export declare const isProductLoading: (state: StoreState, id: ProductEntity['id']) => boolean | undefined; /** * Returns the fetched status of a specific product. * * @param state - Application state. * @param id - Product id. * * @returns If a certain product has been fetched or not. */ export declare const isProductFetched: (state: StoreState, id: ProductEntity['id']) => boolean; /** * Returns if the product is duplicated or not. * * @param state - Application state. * @param id - Product id. * * @returns If a certain product is duplicated or not. */ export declare const isProductDuplicated: (state: StoreState, id: ProductEntity['id']) => boolean | undefined; /** * Returns all the info about breadcrumbs at Pdp. * * @param state - Application state. * @param id - Product id. * * @returns Breadcrumbs info. */ export declare const getProductBreadcrumbs: (state: StoreState, id: ProductEntity['id']) => import("@farfetch/blackout-client").ProductsBreadcrumb[] | undefined; /** * Function responsible for checking the remaining available quantity of a product * of a given size, based on its quantity in the bag. * * To use this selector you should be using products and bag reducers at the same * time. * * @param state - Application state. * @param productId - Numeric identifier of the product. * @param sizeId - Numeric identifier of the size. * * @returns Difference between the total quantity of product size and the respective bag quantity. */ export declare const getProductSizeRemainingQuantity: (state: StoreState, productId: ProductEntity['id'], sizeId: SizeAdapted['id']) => number; /** * Function responsible for checking the remaining available quantity for each size * of the provided product, based on its quantity in the bag. * * To use this selector you should be using products and bag reducers at the same * time. * * @param state - Application state. * @param productId - Numeric identifier of the product. * * @returns Product sizes array with updated quantity, as the difference between the total quantity of * product size and the respective bag quantity. */ export declare const getAllProductSizesRemainingQuantity: (state: StoreState, productId: ProductEntity['id']) => SizesAdapted; /** * Returns all the info about grouping for the given product id. This * selector should be used on listing pages to get the grouped entries. This * information comes from the listing endpoint and is attached to the products * entity by product id. * * @example * ``` * import { getProductGroupedEntries } from '@farfetch/blackout-redux'; * * const mapStateToProps = state => ({ * groupedEntries: getProductGroupedEntries(state, productId) * }); * * ``` * @example * ``` * // Result of grouping * { * totalItems: 20, // Total colors available * remaining: 15, // Number of remaining colors available * entries: [ // Info about the available colors * { * productId: 12912485, * merchantId: 9359, * shortDescription: 'Cotton Patchwork Trousers', * images: [ * { * order: 1, * size: '50', * url: 'image-1' * } * ] * } * ] * }; * * ``` * * @param state - Application state. * @param productId - Product identifier. * * @returns Product grouped entries object. */ export declare const getProductGroupedEntries: (state: StoreState, productId: ProductEntity['id']) => { totalItems: number; remaining: number; entries: NonNullable['entries']; } | undefined;