import * as _$react_jsx_runtime0 from "react/jsx-runtime"; import React from "react"; //#region src/extensions/gallery/providers/api/promotions/promotions.d.ts interface PromotionImage { id: string; url: string; width?: number; height?: number; } //#endregion //#region ../../node_modules/@wix/editor-react-types/dist/links.d.ts type LinkTarget = '_self' | '_blank'; /** * A link to a URL, used for navigation within components. * * @example * ```tsx * import type { Link } from '@wix/editor-react-types'; * * interface MyComponentProps { * link?: Link; * } * ``` */ type Link = { /** * The link URL. For partial links (see `pageRole`), this is the router prefix * (e.g. `https://www.my-site.com/prefix`) rather than a fully resolved URL. */ href?: string; /** * Where this link should open. * - `'_self'` — opens in the same page. * - `'_blank'` — opens in a new tab. */ target?: LinkTarget; /** The `rel` attribute of the link. Accepts LinkRel values separated by a space. */ rel?: string; /** * Page role identifier. Present only on partial links, where only the router prefix is * known and the full URL format is owned by the Router/App. Applications can use such * links in functions to resolve the complete URL at runtime (e.g. for binding links). * Resolved links will not have this field. */ pageRole?: string; }; //#endregion //#region src/extensions/gallery/providers/promotion-item-context/contract.d.ts interface PromotionItemContextValue { /** The id of the promotion */ id: string; /** The name of the promotion (should not be used for display) */ name?: string; /** The destination URL of the promotion */ destinationUrl?: Link; /** The image of the promotion */ image?: PromotionImage; /** The alt text of the promotion */ altText?: string; /** The position of the promotion */ position: number; } //#endregion //#region src/extensions/gallery/providers/promotion-item-context/promotion-item-context-provider.d.ts interface PromotionItem { /** The current entry of the `promotionItems` array. */ promotion: PromotionItemContextValue; } /** * The `usePromotionItemContext()` hook provides access to a promotion shown among the products in a * **Product List**, including its image, alt text, link, and position. Use it to build a promotion * card, such as a banner that links to a sale. It returns `null` outside a **Promotion Item**. */ declare function usePromotionItemContext(): PromotionItemContextValue | null; declare function usePromotionItemContextValue({ promotion }: PromotionItem): PromotionItemContextValue; type PromotionItemContextImplementation = ReturnType; /** Props accepted by {@link PromotionItemContextProvider}. */ interface PromotionItemContextProviderProps extends React.PropsWithChildren { promotionItem?: PromotionItem; } /** Supplies the promotion for one product list promotion entry. */ declare function PromotionItemContextProvider({ promotionItem, children }: PromotionItemContextProviderProps): _$react_jsx_runtime0.JSX.Element; //#endregion export { PromotionItem, PromotionItemContextImplementation, PromotionItemContextProvider, PromotionItemContextProvider as default, PromotionItemContextProviderProps, type PromotionItemContextValue, usePromotionItemContext };