'use strict';

var React = require('react');
var ListItemContext = require('./ListItemContext.js');

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

exports.useListItemControl = useListItemControl;
//# sourceMappingURL=useListItemControl.js.map
