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 { Text } from 'react-native';
import { memo } from 'react';
import { ComponentID, PageID } from '../../enums/enumUIKitID';
import { useAmityElement, useUiKitConfig } from '../../hooks';
const TextKeyElement = ({
  pageID = PageID.WildCardPage,
  componentID = ComponentID.WildCardComponent,
  elementID,
  ...props
}) => {
  const {
    isExcluded,
    accessibilityId
  } = useAmityElement({
    pageId: pageID,
    componentId: componentID,
    elementId: elementID
  });
  const [configText] = useUiKitConfig({
    page: pageID,
    component: componentID,
    element: elementID,
    keys: ['text']
  });
  if (isExcluded) return null;
  return /*#__PURE__*/React.createElement(Text, _extends({
    testID: accessibilityId,
    accessibilityLabel: accessibilityId
  }, props), configText);
};
export default /*#__PURE__*/memo(TextKeyElement);
//# sourceMappingURL=TextKeyElement.js.map