import { trackSplit } from 'ripple';
import { useStepsContext, type UseStepsContext } from './use-steps-context';

export interface StepsContextProps {
  children?: (context: UseStepsContext) => any;
  [key: string]: any;
}

export component StepsContext(props: StepsContextProps) {
  const [children] = trackSplit(props, ['children']);
  const context = useStepsContext();
  <@children {context} />
}
