import { createVNode } from '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 createVNode(Component, {
      "class": [{
        [`${itemPrefixCls}-item-label`]: notEmpty(label),
        [`${itemPrefixCls}-item-content`]: notEmpty(content)
      }],
      "colSpan": span
    }, {
      default: () => [notEmpty(label) && createVNode("span", {
        "style": labelStyle
      }, [label]), notEmpty(content) && createVNode("span", {
        "style": contentStyle
      }, [content])]
    });
  }
  return createVNode(Component, {
    "class": [`${itemPrefixCls}-item`],
    "colSpan": span
  }, {
    default: () => [createVNode("div", {
      "class": `${itemPrefixCls}-item-container`
    }, [(label || label === 0) && createVNode("span", {
      "class": [`${itemPrefixCls}-item-label`, {
        [`${itemPrefixCls}-item-no-colon`]: !colon
      }],
      "style": labelStyle
    }, [label]), (content || content === 0) && createVNode("span", {
      "class": `${itemPrefixCls}-item-content`,
      "style": contentStyle
    }, [content])])]
  });
};

export { Cell as default };
//# sourceMappingURL=Cell.mjs.map
