function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
import { Image } from 'react-native';
import { memo } from 'react';
import { ComponentID, PageID } from '../../enums/enumUIKitID';
import { useAmityElement, useConfigImageUri } from '../../hooks';
const ImageElement = ({
  pageID = PageID.WildCardPage,
  componentID = ComponentID.WildCardComponent,
  elementID,
  configKey,
  ...props
}) => {
  const {
    accessibilityId,
    isExcluded
  } = useAmityElement({
    pageId: pageID,
    componentId: componentID,
    elementId: elementID
  });
  const imageSource = useConfigImageUri({
    configPath: {
      page: pageID,
      component: componentID,
      element: elementID
    },
    configKey: configKey
  });
  if (isExcluded) return null;
  return /*#__PURE__*/React.createElement(Image, _extends({
    testID: accessibilityId,
    accessibilityLabel: accessibilityId,
    source: props.source ?? imageSource
  }, props));
};
export default /*#__PURE__*/memo(ImageElement);
//# sourceMappingURL=ImageElement.js.map