import { extend } from '../../vue';
import { NAME_TABLE } from '../../constants/components';
import { sortKeys } from '../../utils/object';
import { makePropsConfigurable } from '../../utils/props';
import { attrsMixin } from '../../mixins/attrs';
import { hasListenerMixin } from '../../mixins/has-listener';
import { props as props$1, idMixin } from '../../mixins/id';
import { normalizeSlotMixin } from '../../mixins/normalize-slot';
import { props as props$2, bottomRowMixin } from './helpers/mixin-bottom-row';
import { props as props$3, busyMixin } from './helpers/mixin-busy';
import { props as props$4, captionMixin } from './helpers/mixin-caption';
import { props as props$5, colgroupMixin } from './helpers/mixin-colgroup';
import { props as props$6, emptyMixin } from './helpers/mixin-empty';
import { props as props$7, filteringMixin } from './helpers/mixin-filtering';
import { props as props$8, itemsMixin } from './helpers/mixin-items';
import { props as props$9, paginationMixin } from './helpers/mixin-pagination';
import { props as props$a, providerMixin } from './helpers/mixin-provider';
import { props as props$b, selectableMixin } from './helpers/mixin-selectable';
import { props as props$c, sortingMixin } from './helpers/mixin-sorting';
import { props as props$d, stackedMixin } from './helpers/mixin-stacked';
import { props as props$e, tableRendererMixin } from './helpers/mixin-table-renderer';
import { props as props$f, tbodyMixin } from './helpers/mixin-tbody';
import { props as props$g, tfootMixin } from './helpers/mixin-tfoot';
import { props as props$h, theadMixin } from './helpers/mixin-thead';
import { props as props$i, topRowMixin } from './helpers/mixin-top-row';

// --- Props ---

const props = makePropsConfigurable(sortKeys({
  ...props$1,
  ...props$2,
  ...props$3,
  ...props$4,
  ...props$5,
  ...props$6,
  ...props$7,
  ...props$8,
  ...props$9,
  ...props$a,
  ...props$b,
  ...props$c,
  ...props$d,
  ...props$e,
  ...props$f,
  ...props$g,
  ...props$h,
  ...props$i
}), NAME_TABLE);

// --- Main component ---

// @vue/component
const BTable = /*#__PURE__*/extend({
  name: NAME_TABLE,
  // Order of mixins is important!
  // They are merged from first to last, followed by this component
  mixins: [
  // General mixins
  attrsMixin, hasListenerMixin, idMixin, normalizeSlotMixin,
  // Required table mixins
  itemsMixin, tableRendererMixin, stackedMixin, theadMixin, tfootMixin, tbodyMixin,
  // Table features mixins
  stackedMixin, filteringMixin, sortingMixin, paginationMixin, captionMixin, colgroupMixin, selectableMixin, emptyMixin, topRowMixin, bottomRowMixin, busyMixin, providerMixin],
  props
  // Render function is provided by `tableRendererMixin`
});

export { BTable, props };
