"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = exports.Item = void 0;

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

var _classnames = _interopRequireDefault(require("classnames"));

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

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var prefixCls = 'pxx-descriptions';

var Descriptions = function Descriptions(props) {
  var _classNames;

  var _props$isHorizontal = props.isHorizontal,
      isHorizontal = _props$isHorizontal === void 0 ? false : _props$isHorizontal,
      style = props.style;
  return /*#__PURE__*/_react.default.createElement("div", {
    style: style,
    className: (0, _classnames.default)("".concat(prefixCls, "-wrapper"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-descriptions-horizontal"), isHorizontal), _defineProperty(_classNames, "".concat(prefixCls, "-descriptions-vertical"), !isHorizontal), _classNames))
  }, props.children);
};

var Item = function Item(props) {
  var label = props.label,
      children = props.children;
  return /*#__PURE__*/_react.default.createElement("div", {
    className: "".concat(prefixCls, "-description")
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: "".concat(prefixCls, "-label")
  }, label, "\uFF1A"), /*#__PURE__*/_react.default.createElement("div", {
    className: "".concat(prefixCls, "-value")
  }, children));
};

exports.Item = Item;
Descriptions.Item = Item; // @ts-ignore

var _default = Descriptions;
exports.default = _default;