import { Children, ReactElement, ReactNode } from 'react'; import Box from './Box'; import Button from './Button'; import ButtonLink from './ButtonLink'; import Flex from './Flex'; import InternalPopover from './Popover/InternalPopover'; import styles from './PopoverMessage.css'; import Text from './Text'; import useExperimentalTheme from './utils/useExperimentalTheme'; import { Indexable } from './zIndex'; type Size = 'sm' | 'flexible'; type Role = 'dialog' | 'tooltip'; type PrimaryActionType = | { accessibilityLabel?: string; href: string; onClick?: (arg1: { event: React.MouseEvent | React.KeyboardEvent; dangerouslyDisableOnNavigation: () => void; }) => void; rel?: 'none' | 'nofollow'; role: 'link'; target?: null | 'self' | 'blank'; text: string; } | { accessibilityLabel?: string; onClick?: (arg1: { event: React.MouseEvent | React.KeyboardEvent; }) => void; role?: 'button'; text: string; }; function PrimaryAction(props: PrimaryActionType) { if (props.role === 'link') { return ( ); } return (