/** * Hook to provide data for the business logic attached to the wishlist sets. */ import { type WishlistSetActionMetadata } from '@farfetch/blackout-redux'; import type { Config, PatchWishlistSetData, PostWishlistSetData, WishlistSet } from '@farfetch/blackout-client'; import type { UseWishlistSetsOptions } from './types/index.js'; /** * Provides Redux actions and state access for dealing with wishlist sets business * logic. * * @returns All the handlers, state, actions and relevant data needed to manage any wishlist sets * operation. */ declare const useWishlistSets: (options?: UseWishlistSetsOptions) => { actions: { /** * Adds a wishlist set. */ add: (data: PostWishlistSetData, config?: Config | undefined) => Promise; /** * Removes the wishlist set. */ remove: (wishlistSetId: WishlistSet['setId'], config?: Config | undefined) => Promise; /** * Updates the wishlist set. */ update: (wishlistSetId: WishlistSet['setId'], data: PatchWishlistSetData, metadata?: WishlistSetActionMetadata, config?: Config | undefined) => Promise; /** * Fetches the wishlist set. */ fetchWishlistSet: (wishlistSetId: WishlistSet['setId'], config?: Config | undefined) => Promise; /** * Fetches the wishlist sets. */ fetch: (config?: Config | undefined) => Promise; /** * Resets the wishlist sets. */ reset: () => void; }; /** * List of error states for the wishlist sets. */ allWishlistSetsErrors: import("@farfetch/blackout-redux").WishlistSetsErrors | undefined; /** * Whether the wishlist sets are loading. */ areLoading: boolean; /** * Whether the fetch request of the wishlist sets finished either with success or error. */ areFetched: boolean; /** * Error state of the fetched wishlist sets. */ error: import("@farfetch/blackout-client").BlackoutError | undefined; /** * Whether any of the wishlist sets is loading. */ isAnyWishlistSetLoading: boolean; /** * Whether any of the wishlist sets is has an error. */ isAnyWishlistSetWithError: boolean; /** * Fetched wishlist sets data. */ data: import("@farfetch/blackout-redux").WishlistSetsDenormalized; }; export default useWishlistSets;