"use strict";

require("core-js/modules/es.symbol.js");
require("core-js/modules/es.array.filter.js");
require("core-js/modules/es.array.for-each.js");
require("core-js/modules/es.array.push.js");
require("core-js/modules/es.object.define-properties.js");
require("core-js/modules/es.object.define-property.js");
require("core-js/modules/es.object.get-own-property-descriptor.js");
require("core-js/modules/es.object.get-own-property-descriptors.js");
require("core-js/modules/es.object.keys.js");
require("core-js/modules/es.object.to-string.js");
require("core-js/modules/esnext.iterator.constructor.js");
require("core-js/modules/esnext.iterator.filter.js");
require("core-js/modules/esnext.iterator.for-each.js");
require("core-js/modules/web.dom-collections.for-each.js");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.TextBubble = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
require("core-js/modules/es.string.bold.js");
var _classnames = _interopRequireDefault(require("classnames"));
var _react = _interopRequireDefault(require("react"));
require("./index.css");
var _jsxRuntime = require("react/jsx-runtime");
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var TextBubble = exports.TextBubble = function TextBubble(_ref) {
  var styles = _ref.styles,
    _ref$type = _ref.type,
    type = _ref$type === void 0 ? 'gray' : _ref$type,
    _ref$size = _ref.size,
    size = _ref$size === void 0 ? 'medium' : _ref$size,
    _ref$txt = _ref.txt,
    txt = _ref$txt === void 0 ? 'Hello, World!' : _ref$txt,
    _ref$bold = _ref.bold,
    bold = _ref$bold === void 0 ? false : _ref$bold,
    _ref$lineHeight = _ref.lineHeight,
    lineHeight = _ref$lineHeight === void 0 ? 'medium' : _ref$lineHeight,
    _ref$marginBottom = _ref.marginBottom,
    marginBottom = _ref$marginBottom === void 0 ? 0 : _ref$marginBottom,
    classnames = _ref.classnames;
  var cls = (0, _classnames["default"])('fcr-text-bubble', classnames, (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])({
    'fcr-text-bubble--gray': type === 'gray',
    'fcr-text-bubble--gray-2': type === 'gray_2',
    'fcr-text-bubble--white': type === 'white',
    'fcr-text-bubble--purple': type === 'purple',
    'fcr-text-bubble--transparent': type === 'transparent',
    'fcr-text-bubble--small': size === 'small',
    'fcr-text-bubble--medium': size === 'medium',
    'fcr-text-bubble--large': size === 'large'
  }, bold ? 'fcr-text-bubble--weight-bold' : 'fcr-text-bubble--weight-normal', true), 'fcr-text-bubble--line-height-small', lineHeight === 'small'), 'fcr-text-bubble--line-height-medium', lineHeight === 'medium'), 'fcr-text-bubble--line-height-large', lineHeight === 'large'));
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
    className: cls,
    style: _objectSpread(_objectSpread({}, styles), marginBottom ? {
      marginBottom: marginBottom
    } : {}),
    children: typeof txt === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
      children: txt
    }) : txt
  });
};