"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.MixinsStacked = exports.MixinsSpacing = exports.UnstyledButtonTriger = exports.FourPlacements = exports.Default = exports["default"] = void 0;

var _react = _interopRequireDefault(require("react"));

var _styledComponents = _interopRequireDefault(require("styled-components"));

var _primitives = require("../../../primitives");

var _typography = require("../../typography");

var _behaviors = require("../../behaviors");

var _secondaryButton = require("../../actions/secondary-button");

var _tertiaryButton = require("../../actions/tertiary-button");

var _tooltip = require("./tooltip.component");

var _marginChecker = require("../../../mixins/spacing/story-support/margin-checker");

var _paddingChecker = require("../../../mixins/spacing/story-support/padding-checker");

var _stackedChecker = require("../../../mixins/stacking/story-support/stacked-checker");

var _tooltip2 = _interopRequireDefault(require("./tooltip.mdx"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

var _default = {
  component: _tooltip.Tooltip,
  title: 'Tooltip',
  parameters: {
    docs: {
      page: _tooltip2["default"]
    }
  }
};
exports["default"] = _default;
var NormalBox = (0, _styledComponents["default"])(_primitives.Box).withConfig({
  displayName: "NormalBox",
  componentId: "sc-1pzxvw-0"
})(["height:300px;"]);
var PlacementsBox = (0, _styledComponents["default"])(_primitives.Box).withConfig({
  displayName: "PlacementsBox",
  componentId: "sc-1pzxvw-1"
})(["height:400px;width:700px;display:flex;flex-direction:column;align-items:center;"]);

var Default = function Default() {
  return /*#__PURE__*/_react["default"].createElement(NormalBox, null, /*#__PURE__*/_react["default"].createElement(_tooltip.Tooltip, {
    placement: "bottom",
    reference: function reference(_ref) {
      var ref = _ref.ref,
          referenceProps = _ref.referenceProps;
      return /*#__PURE__*/_react["default"].createElement(_secondaryButton.SecondaryButton, _extends({}, referenceProps, {
        ref: ref
      }), "Reference element");
    }
  }, "You cannot access this client until they log in for the first time and provide consent"));
};

exports.Default = Default;

var FourPlacements = function FourPlacements() {
  return /*#__PURE__*/_react["default"].createElement(PlacementsBox, null, ['left', 'right', 'top', 'bottom'].map(function (location) {
    return /*#__PURE__*/_react["default"].createElement(_tooltip.Tooltip, {
      key: location,
      placement: location,
      reference: function reference(_ref2) {
        var ref = _ref2.ref,
            referenceProps = _ref2.referenceProps;
        return /*#__PURE__*/_react["default"].createElement(_tertiaryButton.TertiaryButton, _extends({
          spacing: "mb2"
        }, referenceProps, {
          ref: ref
        }), location);
      }
    }, "You cannot access this client until they log in for the first time and provide consent");
  }));
};

exports.FourPlacements = FourPlacements;

var UnstyledButtonTriger = function UnstyledButtonTriger() {
  return /*#__PURE__*/_react["default"].createElement(NormalBox, null, /*#__PURE__*/_react["default"].createElement(_tooltip.Tooltip, {
    placement: "bottom",
    reference: function reference(_ref3) {
      var ref = _ref3.ref,
          referenceProps = _ref3.referenceProps;
      return /*#__PURE__*/_react["default"].createElement(_behaviors.UnstyledButton, _extends({}, referenceProps, {
        ref: ref
      }), /*#__PURE__*/_react["default"].createElement(_typography.Span, {
        underlined: true
      }, "Reference element"));
    }
  }, "You cannot access this client until they log in for the first time and provide consent"));
};

exports.UnstyledButtonTriger = UnstyledButtonTriger;

var MixinsSpacing = function MixinsSpacing() {
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_marginChecker.MarginChecker, {
    Component: _tooltip.Tooltip,
    placement: "bottom",
    isVisible: true,
    reference: function reference(_ref4) {
      var ref = _ref4.ref,
          referenceProps = _ref4.referenceProps;
      return /*#__PURE__*/_react["default"].createElement(_tertiaryButton.TertiaryButton, _extends({}, referenceProps, {
        ref: ref
      }), "Click");
    }
  }, "Hello"), /*#__PURE__*/_react["default"].createElement(_paddingChecker.PaddingChecker, {
    Component: _tooltip.Tooltip,
    placement: "bottom",
    isVisible: false,
    reference: function reference(_ref5) {
      var ref = _ref5.ref,
          referenceProps = _ref5.referenceProps;
      return /*#__PURE__*/_react["default"].createElement(_tertiaryButton.TertiaryButton, _extends({}, referenceProps, {
        ref: ref
      }), "Click");
    }
  }, "Hello"));
};

exports.MixinsSpacing = MixinsSpacing;

var MixinsStacked = function MixinsStacked() {
  return /*#__PURE__*/_react["default"].createElement(_stackedChecker.StackedChecker, {
    Component: _tooltip.Tooltip,
    placement: "bottom",
    isVisible: true,
    reference: function reference(_ref6) {
      var ref = _ref6.ref,
          referenceProps = _ref6.referenceProps;
      return /*#__PURE__*/_react["default"].createElement(_tertiaryButton.TertiaryButton, _extends({}, referenceProps, {
        ref: ref
      }), "Click");
    }
  }, "Hello");
};

exports.MixinsStacked = MixinsStacked;