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 { useStyles } from './styles';
import { useAmityElement } from '../../hooks';
import { Typography } from '../../../core/components/Typography/Typography';
import { ComponentID, ElementID, PageID } from '../../enums/enumUIKitID';
function Title({
  children,
  variant = 'title',
  pageId = PageID.WildCardPage,
  componentId = ComponentID.WildCardComponent,
  elementId = ElementID.title,
  ...props
}) {
  const {
    isExcluded,
    accessibilityId,
    config,
    themeStyles
  } = useAmityElement({
    pageId,
    componentId,
    elementId
  });
  const styles = useStyles(themeStyles);
  if (isExcluded) return null;
  const $Typography = variant === 'title' ? Typography.TitleBold : Typography.BodyBold;
  return /*#__PURE__*/React.createElement($Typography, _extends({
    testID: accessibilityId,
    accessibilityLabel: accessibilityId,
    style: [styles.title, props.style]
  }, props), (config === null || config === void 0 ? void 0 : config.text) ?? children);
}
export default Title;
//# sourceMappingURL=index.js.map