"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.PrimaryPageButton = PrimaryPageButton;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _react = _interopRequireDefault(require("react"));
var _designSystem = require("@wix/design-system");
var _wixUiIconsCommon = require("@wix/wix-ui-icons-common");
var _react2 = require("@wix/bex-core/react");
var _bi = require("@wix/bex-core/bi");
var _usePageButtonBiParams = require("../usePageButtonBiParams");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/PrimaryPageButton/PrimaryPageButton.tsx";
/**
 * @deprecated
 * Use `PrimaryActions` component instead.
 */
function PrimaryPageButton({
  onClick,
  text,
  prefixIcon,
  ...rest
}) {
  const {
    translate: t,
    reportBi
  } = (0, _react2.useWixPatternsContainer)();
  const content = text ?? t('cairo.page.primary.cta');
  const {
    pageType,
    location
  } = (0, _usePageButtonBiParams.usePageButtonBiParams)();
  return /*#__PURE__*/_react.default.createElement(_designSystem.Button, (0, _extends2.default)({}, rest, {
    prefixIcon: prefixIcon ?? /*#__PURE__*/_react.default.createElement(_wixUiIconsCommon.Add, {
      __self: this,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 43,
        columnNumber: 33
      }
    }),
    size: "medium",
    skin: "standard",
    as: "button",
    onClick: e => {
      reportBi((0, _bi.cairoPageCtaClicked)({
        ctaName: content,
        ctaType: 'Primary Page Button',
        location,
        componentType: 'Page',
        pageType,
        section: 'Vertical'
      }));
      onClick(e);
    },
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 41,
      columnNumber: 5
    }
  }), content);
}
//# sourceMappingURL=PrimaryPageButton.js.map