"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = void 0;
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _react = _interopRequireWildcard(require("react"));
var _Start = _interopRequireDefault(require("./components/Start/Start"));
var _Center = _interopRequireDefault(require("./components/Center/Center"));
var _End = _interopRequireDefault(require("./components/End/End"));
var _FooterSt = require("./Footer.st.css.js");
var _Divider = _interopRequireDefault(require("../../../Divider"));
var _buildChildrenObject = require("../../../common/utils/buildChildrenObject");
var _deprecationLog = _interopRequireDefault(require("../../../utils/deprecationLog"));
var _excluded = ["divider", "className", "children", "dataHook"];
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/Page/components/Footer/Footer.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); }
/** Layout footer component of 3 columns */
var Footer = _ref => {
  var _props$showDivider;
  var {
      divider = false,
      className,
      children,
      dataHook
    } = _ref,
    props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
  (0, _react.useEffect)(() => {
    if (divider) {
      (0, _deprecationLog.default)('<Page.Footer/> - prop "divider" is deprecated and will be removed in next major release, please use "showDivider" property instead.');
    }
  }, [divider]);
  var showDivider = (_props$showDivider = props.showDivider) !== null && _props$showDivider !== void 0 ? _props$showDivider : divider;
  var childrenObj = (0, _buildChildrenObject.buildChildrenObject)(children, {
    Start: /*#__PURE__*/_react.default.createElement(_Start.default, {
      key: "start",
      __self: void 0,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 29,
        columnNumber: 12
      }
    }),
    Center: /*#__PURE__*/_react.default.createElement(_Center.default, {
      key: "center",
      __self: void 0,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 30,
        columnNumber: 13
      }
    }),
    End: /*#__PURE__*/_react.default.createElement(_End.default, {
      key: "end",
      __self: void 0,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 31,
        columnNumber: 10
      }
    })
  });
  return /*#__PURE__*/_react.default.createElement("div", {
    className: _FooterSt.classes.root,
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 35,
      columnNumber: 5
    }
  }, showDivider && /*#__PURE__*/_react.default.createElement("div", {
    className: _FooterSt.classes.divider,
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 37,
      columnNumber: 9
    }
  }, /*#__PURE__*/_react.default.createElement(_Divider.default, {
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 38,
      columnNumber: 11
    }
  })), /*#__PURE__*/_react.default.createElement("div", {
    className: (0, _FooterSt.st)(_FooterSt.classes.container, className),
    "data-hook": dataHook,
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 41,
      columnNumber: 7
    }
  }, Object.values(childrenObj)));
};
Footer.displayName = 'Page.Footer';
Footer.Start = _Start.default;
Footer.Center = _Center.default;
Footer.End = _End.default;
Footer.Start.displayName = 'Page.Footer.Start';
Footer.Center.displayName = 'Page.Footer.Center';
Footer.End.displayName = 'Page.Footer.End';
var _default = exports.default = Footer;
//# sourceMappingURL=Footer.js.map