import { default as React } from 'react'; import { ImageProps } from '../Image/Image'; import { TagProps } from '../Tag/Tag'; interface Marketplace { name: string; link?: string; } interface BaseProps { /** sortBy prop object which must include the `prop` value in order to highlight selected sort */ sortBy: { prop: string; order?: 'asc' | 'desc'; }; /** the sold_by_iserve and/or sold_by_threepn values as an object */ soldBy?: { iserve?: boolean; threepn?: boolean; }; /** an array of tag objects which include the text, color and (if applicable) solid values */ tags?: TagProps[]; /** the main display text */ title: string; /** the main display text trim length */ titleTrimTextLimit?: number; /** the prop string associated with the title value in the product object (for sorting) */ titleProp?: string; /** id props: the id value, the label to display (such as `ID` or `asin`) and the prop associated with the id value in the product object (for sorting) */ uniqId: { id: string | number; idLabel: string; idName: string; enableCopyIdButton?: boolean; }; /** the image prop object which includes {alt, url} and custom classes and image styles */ imageProps?: ImageProps; /** product description text */ description?: string; /** Optional prop to add a test id to the PrimaryTableCell for QA testing */ qaTestId?: string; } type CellWithLink = BaseProps & { /** URL that goes to the product information page for the selected product */ productLink: string; /** Router component (e.g. Using Link from react-router-dom) */ routerComponent: React.ElementType; /** Allow any props to be passed in */ routerProp: string; }; type CellWithoutLink = BaseProps & { productLink?: never; routerComponent?: never; routerProp?: never; }; type PrimaryTableLinkAndBaseProps = CellWithLink | CellWithoutLink; type LegacyMarketplaceProps = { /** @deprecated Use marketplaces prop instead. */ externalLink?: string; /** @deprecated Use marketplaces prop instead. */ marketplaceNames?: string[] | string; /** Cannot be used with legacy marketplace props */ marketplaces?: never; }; type NewMarketplaceProps = { /** @deprecated Use marketplaces prop instead. Cannot be used with marketplaces prop */ externalLink?: never; /** @deprecated Use marketplaces prop instead. Cannot be used with marketplaces prop */ marketplaceNames?: never; /** Array of marketplace objects with name and individual links */ marketplaces?: Marketplace[]; }; export type PrimaryTableCellProps = PrimaryTableLinkAndBaseProps & (LegacyMarketplaceProps | NewMarketplaceProps); declare const PrimaryTableCell: (props: PrimaryTableCellProps) => React.JSX.Element; export default PrimaryTableCell;