import { App, defineComponent } from 'vue';

import style from './style/index.module.less';

const TableLayout = defineComponent({
  name: 'TableLayout',
  // props: {
  // pagination: {
  //   type: [Object, Boolean],
  //   default: () => config.props.pagination
  // },
  // scroll: {
  //   type: Object,
  //   default: () => config.props.scroll
  // }
  // },
  setup(props, { attrs, slots }) {
    return () => (
      <div class="flex flex-col h-full" class={style['table-layout']}>
        <div class="filter-container">{slots?.filter()}</div>
        <div class="table-container flex-auto h-0">{slots?.table()}</div>
      </div>
    );
  }
});

export default TableLayout as typeof TableLayout & {
  install: (app: App, ...options: any[]) => any;
};
