import React from 'react'; import type { StatusIndicatorStateName, StatusIndicatorVariant } from '@shoptet/ui-core-web'; import type { SafeOmit } from '@shoptet/utils'; import { SHAPE_GEOMETRY, shapeForState } from './StatusIndicatorGeometry'; export interface StatusIndicatorShapeProps extends SafeOmit< React.ComponentProps<'svg'>, 'children' | 'className' | 'aria-hidden' | 'role' > { state: StatusIndicatorStateName; variant: StatusIndicatorVariant; /** Icon-font glyph character (resolve via `iconGlyphChar`). When omitted, no glyph is drawn. */ symbolChar?: string; } /** Decorative inline SVG, always `aria-hidden`; the accessible name lives on the indicator root. */ export function StatusIndicatorShape({ state, variant, symbolChar, ...rest }: StatusIndicatorShapeProps) { return ( {SHAPE_GEOMETRY[variant][shapeForState(state)]} {symbolChar !== undefined && ( {symbolChar} )} ); }