import { CompiledTemplate } from "../../../flex-ui-core/src"; import * as React from "react"; import { BadgePropsWithDefaultPropsAsOptional, ComponentBadgeProps } from "../../ComponentBadgeProps.definitions"; import { TaskContextProps } from "../../context"; /** * @typedef {TaskContextProps} SideLink.SideLinkProps * @property {string | React.ReactNode} icon - the name of a default Icon, see {@tutorial available-icons}. * @property {string | React.ReactNode} [iconActive] - the name of a active Icon, see {@tutorial available-icons}. * @property {boolean} [showLabel] - Identifies if the label is shown. * @property {Function} [onClick] - Callback called when link is clicked. * @property {boolean} [isActive] - Represents if current link is active. * @property {string} [activeView] - Represents the active view. * @property {ComponentBadgeProps} [Badge] - Set of properties for internal Badge element. * @property {Function} [setBadgeDisplayed] - Function to call to display badge. * @private */ export interface SideLinkProps extends TaskContextProps { icon: string | React.ReactNode; iconActive?: string | React.ReactNode; showLabel?: boolean; onClick?: () => void; isActive?: boolean; activeView?: string; Badge?: ComponentBadgeProps; setBadgeDisplayed?: (displayed: boolean) => void; children?: React.ReactNode; } /** * @typedef {SideLink.SideLinkProps} SideLink.SideLinkChildrenProps * @property {Badge.BadgeProps} [Badge] - Set of properties for internal Badge element. * @private */ export interface SideLinkChildrenProps extends SideLinkProps { Badge?: BadgePropsWithDefaultPropsAsOptional; "aria-label"?: string; } /** * @typedef {SideLink.SideLinkItemChildrenProps} SideLink.SideLinkItemProps * @property {boolean} showLabel - Identifies if the label is shown. * @property {string} activeView - Represents the active view. * @private */ export interface SideLinkItemProps extends SideLinkItemChildrenProps { showLabel: boolean; activeView?: string; } /** * @typedef SideLink.SideLinkItemState * @property {boolean} [badgeDisplayed] - Determines whether a badge is displayed. * @private */ export interface SideLinkItemState { badgeDisplayed: boolean; } /** * @typedef SideLink.SideLinkItemChildrenProps * @property {ComponentBadgeProps} [Badge] - Set of properties for internal Badge element. * @private */ export interface SideLinkItemChildrenProps { Badge?: ComponentBadgeProps; } /** * @typedef {SideLink.SideLinkItemProps} SideLink.SideLinkQueuesStatsProps * @property {string} viewName - Represents the current view name. * @private */ export interface SideLinkQueuesStatsProps extends SideLinkItemProps { viewName: string; } /** * @typedef {SideLink.SideLinkViewProps} SideLink.SideLinkViewProps * @property {string} viewName - Represents the current view name. * @private */ export interface SideLinkViewProps extends SideLinkItemProps { viewName: string; icon: React.ReactNode; iconActive: React.ReactNode; template?: CompiledTemplate; }