import React from 'react'; import { StyleProp, ViewStyle, TextStyle, ImageSourcePropType } from 'react-native'; export type Ux4gBadgeLimit = 'singleDigit' | 'doubleDigit'; export type Ux4gBadgeVariant = 'dot' | 'count' | 'label' | 'icon' | 'readyToUse'; export type Ux4gBadgeAlignment = 'topRight' | 'topLeft' | 'bottomRight' | 'bottomLeft'; export interface Ux4gBadgeOffset { top?: number; right?: number; bottom?: number; left?: number; } export interface Ux4gBadgeProps { /** * Optional child element around which the badge will be overlayed (`Stack` / `Positioned`). * If not provided, renders the badge standalone. */ child?: React.ReactNode; /** * Alias `children` prop for wrapping (`child`). */ children?: React.ReactNode; /** * The type of badge (`dot`, `count`, `label`, `icon`, or `readyToUse`). * Can be auto-inferred from `count`, `label`, `icon`, or `assetPath`. */ variant?: Ux4gBadgeVariant; /** * Number to display when `variant = 'count'`. */ count?: number; /** * Limit formatting threshold (`singleDigit` -> `9+`, `doubleDigit` -> `99+`). * @default 'singleDigit' */ limit?: Ux4gBadgeLimit; /** * Short string text displayed when `variant = 'label'` (e.g., `"NEW"`, `"PRO"`). */ label?: string; /** * Custom icon element or widget displayed when `variant = 'icon'`. */ icon?: React.ReactNode; /** * Local or remote asset path string, `ImageSourcePropType`, React element, or icon function for `variant = 'readyToUse'`. */ assetPath?: string | ImageSourcePropType | React.ReactNode | ((props: any) => React.ReactElement); /** * Custom badge container background color (defaults to `theme.colors.primary`). */ containerColor?: string; /** * Custom text/icon color inside the badge (defaults to `UX4GColors.white`). */ contentColor?: string; /** * Alignment position when wrapping a `child` element (`topRight` default). * @default 'topRight' */ alignment?: Ux4gBadgeAlignment; /** * Custom offset override for precise placement around `child` (defaults to `-4px` on aligned edges). */ offset?: Ux4gBadgeOffset; /** * Whether to display a `1.5px` border around the badge (`false` default). * @default false */ showBorder?: boolean; /** * Custom border color (defaults to `theme.colors.surface`). */ borderColor?: string; /** * Custom style override for the standalone badge container or outer wrapper when wrapping a child. */ style?: StyleProp; /** * Custom style override specifically applied to the badge pill (`_buildBadge`). */ badgeStyle?: StyleProp; /** * Custom text style override applied to numeric count or label string. */ textStyle?: StyleProp; /** * Optional testID for automated testing. */ testID?: string; } /** * **Ux4gBadge** (`Badge`) * * Compound functional component matching exact Flutter `badge.dart` constructors (`Ux4gBadge.dot()`, * `Ux4gBadge.count()`, `Ux4gBadge.label()`, `Ux4gBadge.icon()`, and `Ux4gBadge.readyToUse()`). */ export declare const Ux4gBadge: React.FC & { /** * Dot indicator badge (`Ux4gBadge.dot(...)`). */ dot: (props?: Omit) => React.JSX.Element; /** * Numeric counter badge (`Ux4gBadge.count(...)`). Accepts either exact `count` first argument * or standard props object. */ count: (countOrProps: number | Omit, optionalProps?: Omit) => React.JSX.Element; /** * Label string badge (`Ux4gBadge.label(...)`). Accepts either `label` string first argument * or standard props object. */ label: (labelOrProps: string | Omit, optionalProps?: Omit) => React.JSX.Element; /** * Icon element badge (`Ux4gBadge.icon(...)`). Accepts either `icon` node first argument * or standard props object. */ icon: (iconOrProps: React.ReactNode | Omit, optionalProps?: Omit) => React.JSX.Element; /** * Asset image/svg badge (`Ux4gBadge.readyToUse(...)`). Accepts either `assetPath` first argument * or standard props object. */ readyToUse: (assetOrProps: string | ImageSourcePropType | React.ReactNode | ((props: any) => React.ReactElement) | Omit, optionalProps?: Omit) => React.JSX.Element; }; //# sourceMappingURL=Badge.d.ts.map