'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');

function notEmpty(val) {
  return val !== void 0 && val !== null;
}
const Cell = (props) => {
  const {
    itemPrefixCls,
    component,
    span,
    labelStyle,
    contentStyle,
    bordered,
    label,
    content,
    colon
  } = props;
  const Component = component;
  if (bordered) {
    return vue.createVNode(Component, {
      "class": [{
        [`${itemPrefixCls}-item-label`]: notEmpty(label),
        [`${itemPrefixCls}-item-content`]: notEmpty(content)
      }],
      "colSpan": span
    }, {
      default: () => [notEmpty(label) && vue.createVNode("span", {
        "style": labelStyle
      }, [label]), notEmpty(content) && vue.createVNode("span", {
        "style": contentStyle
      }, [content])]
    });
  }
  return vue.createVNode(Component, {
    "class": [`${itemPrefixCls}-item`],
    "colSpan": span
  }, {
    default: () => [vue.createVNode("div", {
      "class": `${itemPrefixCls}-item-container`
    }, [(label || label === 0) && vue.createVNode("span", {
      "class": [`${itemPrefixCls}-item-label`, {
        [`${itemPrefixCls}-item-no-colon`]: !colon
      }],
      "style": labelStyle
    }, [label]), (content || content === 0) && vue.createVNode("span", {
      "class": `${itemPrefixCls}-item-content`,
      "style": contentStyle
    }, [content])])]
  });
};

exports.default = Cell;
//# sourceMappingURL=Cell.cjs.map
