"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireWildcard(require("react"));
var _TextButton = _interopRequireDefault(require("../../../TextButton"));
var _ToastContext = require("../../../Toast/ToastContext");
var _StatusToastSt = require("../../StatusToast.st.css.js");
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/StatusToast/components/ToastAction/ToastAction.tsx";
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(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 (var _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); }
var ToastAction = _ref => {
  var _useContext$hidden, _useContext;
  var {
    dataHook,
    onClick,
    children
  } = _ref;
  var toastHidden = (_useContext$hidden = (_useContext = (0, _react.useContext)(_ToastContext.ToastContext)) == null ? void 0 : _useContext.hidden) !== null && _useContext$hidden !== void 0 ? _useContext$hidden : false;
  return /*#__PURE__*/_react.default.createElement(_TextButton.default, {
    dataHook: dataHook,
    className: _StatusToastSt.classes.actionButton,
    skin: "light",
    size: "medium",
    underline: "always",
    onClick: onClick,
    disabled: toastHidden,
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 12,
      columnNumber: 5
    }
  }, children);
};
var _default = exports.default = ToastAction;
//# sourceMappingURL=ToastAction.js.map