import { forwardRef } from 'react'; import { View, type ViewProps } from 'react-native'; import { ProgressBarRoot, ProgressBarIndicator, type IProgressProps } from '@cdx-ui/primitives'; import { cn } from '@cdx-ui/utils'; import { progressBarIndicatorVariants, progressBarTrackVariants, type ProgressBarTrackVariantProps, } from './styles'; export interface ProgressBarProps extends IProgressProps, ProgressBarTrackVariantProps { readonly className?: string; } export interface ProgressBarIndicatorProps extends ViewProps { readonly className?: string; } const ProgressBarRootComponent = forwardRef( ({ className, style, ...props }, ref) => { const trackClass = cn(progressBarTrackVariants(), className); return ; }, ); ProgressBarRootComponent.displayName = 'ProgressBar'; const ProgressBarIndicatorComponent = forwardRef( ({ className, style, ...props }, ref) => ( ), ); ProgressBarIndicatorComponent.displayName = 'ProgressBar.Indicator'; type ProgressBarCompoundComponent = typeof ProgressBarRootComponent & { Indicator: typeof ProgressBarIndicatorComponent; }; export const ProgressBar = Object.assign(ProgressBarRootComponent, { Indicator: ProgressBarIndicatorComponent, }) as ProgressBarCompoundComponent;