import React, { type AriaAttributes } from "react"; import type { IconProps } from "../Icon/Icon"; import type { TextColors, TextSize, TextWeight, PolymorphicComponentPropsWithRef, LinkVariations } from "../../types"; type SupplementaryIconProps = Pick; export type LinkConditionalProps = { /** It forces to inherit color, weight, size from parent */ inline: true; /** A color is inherited from its parent Text otherwise set as 'primary' */ color: TextColors; /** Icons are not supported for inline links */ iconLeft?: never; /** Icons are not supported for inline links */ iconRight?: never; } | { inline?: false | undefined; color?: TextColors; /** Icon displayed on the left side of the link */ iconLeft?: SupplementaryIconProps; /** Icon displayed on the right side of the link */ iconRight?: SupplementaryIconProps; }; export type LinkProps = { /** A size is inherited from its parent */ size?: TextSize; /** A weight is inherited from its parent */ weight?: TextWeight; /** @deprecated variant, please use "color" prop instead */ variant?: LinkVariations; "data-e2e-test-id"?: string; } & LinkConditionalProps & AriaAttributes; export type LinkComponent = (props: PolymorphicComponentPropsWithRef) => React.ReactNode | null; export declare const Link: LinkComponent; export {};