"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _hooks = require("../../hooks");
var _enums = require("../../enums");
var _Button = _interopRequireWildcard(require("../../components/Button/Button"));
var _styles = require("./styles");
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
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 ActionButton({
  fullWidth = false,
  pageId = _enums.PageID.WildCardPage,
  componentId = _enums.ComponentID.WildCardComponent,
  elementId = _enums.ElementID.WildCardElement,
  label,
  ...props
}) {
  const {
    themeStyles,
    isExcluded,
    accessibilityId,
    config
  } = (0, _hooks.useAmityElement)({
    pageId,
    componentId,
    elementId
  });
  const {
    styles
  } = (0, _styles.useStyles)(themeStyles);
  if (isExcluded) return null;
  return /*#__PURE__*/React.createElement(_Button.default, _extends({
    type: "primary",
    testID: accessibilityId,
    size: _Button.BUTTON_SIZE.LARGE,
    style: [fullWidth && styles.fullWidth, props.style]
  }, props), label ?? (config === null || config === void 0 ? void 0 : config.text));
}
var _default = exports.default = ActionButton;
//# sourceMappingURL=ActionButton.js.map