import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";

/* eslint-disable jsx-a11y/alt-text */
import React from 'react'; // eslint-disable-line

import { LazyResponsiveImage as GenericResponsiveImage, useConfigState } from '@sentecacommerce-theme/lib';
export var LazyResponsiveImage = (_ref) => {
  var {
    defaultSize = 'large',
    backgroundOverImage = true
  } = _ref,
      rest = _objectWithoutPropertiesLoose(_ref, ["defaultSize", "backgroundOverImage"]);

  var {
    imagesConfig,
    theme
  } = useConfigState();
  return /*#__PURE__*/React.createElement(GenericResponsiveImage, _extends({
    aspectRatio: [imagesConfig.ratio.width, imagesConfig.ratio.height],
    fallbackImage: imagesConfig.fallbackImage,
    breakpointsMap: theme.breakpoints,
    backgroundOverImage: backgroundOverImage,
    background: backgroundOverImage ? theme.palette.primary : theme.palette.disabled,
    defaultSize: defaultSize
  }, rest));
};
//# sourceMappingURL=index.js.map