"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
var _react = _interopRequireDefault(require("react"));
var _constants = require("./constants");
var _colorsSt = require("../Foundation/stylable/colors.st.css.js");
var _Box = _interopRequireDefault(require("../Box"));
var _PreviewWidgetSt = require("./PreviewWidget.st.css.js");
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/PreviewWidget/PreviewWidget.jsx",
  _PreviewWidget;
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
/** Preview content widget*/
var PreviewWidget = /*#__PURE__*/function (_React$PureComponent) {
  function PreviewWidget() {
    (0, _classCallCheck2["default"])(this, PreviewWidget);
    return _callSuper(this, PreviewWidget, arguments);
  }
  (0, _inherits2["default"])(PreviewWidget, _React$PureComponent);
  return (0, _createClass2["default"])(PreviewWidget, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
        dataHook = _this$props.dataHook,
        skin = _this$props.skin,
        contentOutline = _this$props.contentOutline,
        backgroundColor = _this$props.backgroundColor,
        height = _this$props.height,
        width = _this$props.width,
        children = _this$props.children,
        className = _this$props.className,
        scrollable = _this$props.scrollable;
      var rootStyles = {
        height: "".concat(height),
        width: "".concat(width),
        background: skin === _constants.skins.custom && (_colorsSt.stVars[backgroundColor] || backgroundColor)
      };
      return /*#__PURE__*/_react["default"].createElement("div", {
        className: (0, _PreviewWidgetSt.st)(_PreviewWidgetSt.classes.root, {
          skin: skin,
          contentOutline: contentOutline,
          scrollable: scrollable
        }, className),
        "data-hook": dataHook,
        style: rootStyles,
        __self: this,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 40,
          columnNumber: 7
        }
      }, /*#__PURE__*/_react["default"].createElement("div", {
        "data-hook": _constants.dataHooks.contentArea,
        className: _PreviewWidgetSt.classes.contentArea,
        __self: this,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 49,
          columnNumber: 9
        }
      }, children));
    }
  }]);
}(_react["default"].PureComponent);
_PreviewWidget = PreviewWidget;
PreviewWidget.displayName = 'PreviewWidget';
PreviewWidget.defaultProps = {
  skin: 'neutral',
  contentOutline: 'shadow',
  height: 'auto',
  width: '100%',
  scrollable: false,
  children: /*#__PURE__*/_react["default"].createElement(_Box["default"], {
    height: "50px",
    width: "50px",
    __self: _PreviewWidget,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 16,
      columnNumber: 15
    }
  })
};
var _default = exports["default"] = PreviewWidget;