Aggregation = ({ agg_relation, agg_field, stat, block, textStyle }) => {
  const {
    selected,
    connectors: { connect, drag },
  } = useNode((node) => ({ selected: node.events.selected }));
  return (
    <span
      className={`${textStyle} ${selected ? "selected-node" : ""}`}
      {...blockProps(block)}
      ref={(dom) => connect(drag(dom))}
    >
      [{stat} {agg_relation} {agg_field}]
    </span>
  );
}
@param {object} props
@param {string} props.agg_relation
@param {string} props.agg_field
@param {string} props.stat
@param {boolean} props.block
@param {string} props.textStyle
@returns {span}
@category saltcorn-builder
@subcategory components
@namespace