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

function useListItemMedia(size) {
  const {
    setMediaSize,
    mediaSize
  } = useContext(ListItemContext);
  useLayoutEffect(() => {
    setMediaSize(size);
  }, [size, setMediaSize]);
  return {
    mediaSize,
    setMediaSize
  };
}

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