import { createVNode } from 'vue';

function renderExpandIcon({
  prefixCls,
  record,
  onExpand,
  expanded,
  expandable
}) {
  const expandClassName = `${prefixCls}-row-expand-icon`;
  if (!expandable)
    return createVNode("span", {
      "class": [expandClassName, `${prefixCls}-row-spaced`]
    }, null);
  const onClick = (event) => {
    onExpand(record, event);
    event.stopPropagation();
  };
  return createVNode("span", {
    "class": {
      [expandClassName]: true,
      [`${prefixCls}-row-expanded`]: expanded,
      [`${prefixCls}-row-collapsed`]: !expanded
    },
    "onClick": onClick
  }, null);
}
function findAllChildrenKeys(data, getRowKey, childrenColumnName) {
  const keys = [];
  function dig(list) {
    (list || []).forEach((item, index) => {
      keys.push(getRowKey(item, index));
      dig(item[childrenColumnName]);
    });
  }
  dig(data);
  return keys;
}

export { findAllChildrenKeys, renderExpandIcon };
//# sourceMappingURL=expandUtil.mjs.map
