'use strict';

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

var vue = require('vue');
require('../../../utils/index.cjs');
var util = require('./util.cjs');
var props = require('./props.cjs');
var InternalTable = require('./InternalTable.cjs');
var initDefaultProps = require('../../../utils/vue/initDefaultProps.cjs');

var ATable = /* @__PURE__ */ vue.defineComponent({
  name: "ATable",
  inheritAttrs: false,
  props: initDefaultProps.initDefaultProps(props.tableProps(), {
    rowKey: "key"
  }),
  slots: Object,
  setup(props, {
    attrs,
    slots,
    expose
  }) {
    const table = vue.ref();
    expose({
      table
    });
    return () => {
      var _a;
      const columns = props.columns || util.convertChildrenToColumns((_a = slots.default) == null ? void 0 : _a.call(slots));
      return vue.createVNode(InternalTable.default, {
        "ref": table,
        ...attrs,
        ...props,
        "columns": columns || [],
        "expandedRowRender": slots.expandedRowRender || props.expandedRowRender,
        "contextSlots": {
          ...slots
        }
      }, slots);
    };
  }
});

exports.default = ATable;
//# sourceMappingURL=Table.cjs.map
