import { useContext, useLayoutEffect } from 'react';
import { ListItemContext } from './ListItemContext.mjs';

function useListItemControl(controlType, controlProps) {
  const {
    setControlType,
    setControlProps,
    props: baseItemProps
  } = useContext(ListItemContext);
  useLayoutEffect(() => {
    setControlType(controlType);
    setControlProps(controlProps);
  }, [controlType, controlProps, setControlType, setControlProps]);
  return {
    baseItemProps
  };
}

export { useListItemControl };
//# sourceMappingURL=useListItemControl.mjs.map
