import { forwardRef, type HTMLAttributes, type ForwardedRef } from 'react'
import {
getProgressProps,
splitClassNameProp,
} from '@pluralsight/headless-styles'
import type { ProgressOptions } from '@pluralsight/headless-styles/types'
interface ProgressBarProps
extends ProgressOptions,
HTMLAttributes {}
function ProgressBarEl(
props: ProgressBarProps,
ref: ForwardedRef
) {
const { ariaLabel, kind, max, min, now, size, ...nativeProps } = props
const progress = getProgressProps({
ariaLabel,
classNames: splitClassNameProp(props.className),
kind,
max,
min,
now,
size,
})
return (
)
}
export const ProgressBar = forwardRef(
ProgressBarEl
)