import { defineComponent, ref, createVNode } from 'vue';
import '../../../utils/index.mjs';
import { convertChildrenToColumns } from './util.mjs';
import { tableProps } from './props.mjs';
import InternalTable from './InternalTable.mjs';
import { initDefaultProps } from '../../../utils/vue/initDefaultProps.mjs';

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

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