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, ElementID, PageID } from '../../enums/enumUIKitID';
import { useAmityElement, useConfigImageUri } from '../../hooks';
const ImageKeyElement = ({
  pageID = PageID.WildCardPage,
  componentID = ComponentID.WildCardComponent,
  elementID = ElementID.WildCardElement,
  ...props
}) => {
  const configKey = 'image';
  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(ImageKeyElement);
//# sourceMappingURL=ImageKeyElement.js.map