"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = exports.Subheader = void 0;
var _react = _interopRequireWildcard(require("react"));
var _Text = _interopRequireDefault(require("../../../Text"));
var _Box = _interopRequireDefault(require("../../../Box"));
var _SubheaderSt = require("./Subheader.st.css.js");
var _StringUtils = require("../../../utils/StringUtils");
var _deprecationLog = _interopRequireDefault(require("../../../utils/deprecationLog"));
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/Card/components/Subheader/Subheader.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); }
/**
 * @deprecated Card.Subheader is deprecated and will be removed in the next major version. Please use SectionHeader instead.
 */
var Subheader = _ref => {
  var {
    dataHook,
    title,
    suffix,
    skin = 'standard'
  } = _ref;
  (0, _react.useEffect)(() => {
    (0, _deprecationLog.default)('Card.Subheader is deprecated and will be removed in the next major version. Please use SectionHeader instead.');
  }, []);
  return /*#__PURE__*/_react.default.createElement("div", {
    "data-hook": dataHook,
    className: (0, _SubheaderSt.st)(_SubheaderSt.classes.root, {
      skin
    }),
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 25,
      columnNumber: 5
    }
  }, /*#__PURE__*/_react.default.createElement(_Box.default, {
    verticalAlign: "middle",
    flexGrow: 1,
    overflow: "hidden",
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 31,
      columnNumber: 7
    }
  }, (0, _StringUtils.isString)(title) ? /*#__PURE__*/_react.default.createElement(_Text.default, {
    ellipsis: true,
    weight: "normal",
    size: "medium",
    dataHook: "title",
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 33,
      columnNumber: 11
    }
  }, title) : /*#__PURE__*/_react.default.createElement("div", {
    "data-hook": "title-node",
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 37,
      columnNumber: 11
    }
  }, title)), suffix && /*#__PURE__*/_react.default.createElement("div", {
    className: _SubheaderSt.classes.suffix,
    "data-hook": "suffix-node",
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 42,
      columnNumber: 9
    }
  }, suffix));
};
exports.Subheader = Subheader;
Subheader.displayName = 'Card.Subheader';
var _default = exports.default = Subheader;
//# sourceMappingURL=Subheader.js.map