"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _styles = require("./styles");
var _hooks = require("../../hooks");
var _Typography = require("../../../core/components/Typography/Typography");
var _enumUIKitID = require("../../enums/enumUIKitID");
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); }
function Title({
  children,
  variant = 'title',
  pageId = _enumUIKitID.PageID.WildCardPage,
  componentId = _enumUIKitID.ComponentID.WildCardComponent,
  elementId = _enumUIKitID.ElementID.title,
  ...props
}) {
  const {
    isExcluded,
    accessibilityId,
    config,
    themeStyles
  } = (0, _hooks.useAmityElement)({
    pageId,
    componentId,
    elementId
  });
  const styles = (0, _styles.useStyles)(themeStyles);
  if (isExcluded) return null;
  const $Typography = variant === 'title' ? _Typography.Typography.TitleBold : _Typography.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);
}
var _default = exports.default = Title;
//# sourceMappingURL=index.js.map