import { Badge, BadgeProps } from "../flex-ui-core/src"; import { AppState } from "../state"; /** * Badge props with default props as optional * @typedef {} BadgePropsWithDefaultPropsAsOptional * @private */ export type BadgePropsWithDefaultPropsAsOptional = Partial & Omit; /** * Component badge children callback * @callback ComponentBadgeChildrenCallback * @param {AppState} state - state of the application. * @param {T} props - properties of component T. * @returns {number} the numeric value to be displayed in the badge * @private */ export type ComponentBadgeChildrenCallback = (state: AppState, props: T) => number; /** * Component badge props * @typedef {} ComponentBadgeProps * @property {number | ComponentBadgeChildrenCallback} children - The numeric value or a callback which returns a number to be displayed in the notification. * @private */ export type ComponentBadgeProps = Omit & { children: number | ComponentBadgeChildrenCallback; };