import { defineComponent, ref } from 'vue'

// interface Methods {
//   get: string
//   post: string
//   put: string
//   del: string
// }

export default defineComponent({
  name: 'table-pro-v2',
  props: {
    methods: {
      type: Object,
      required: true,
      default: () => ({
        get: '',
        post: '',
        put: '',
        del: ''
      }),
      validator: function (keys: 'get' | 'post' | 'put' | 'del') {
        return keys === 'get'
      }
    },
    columns: {
      type: Array,
      default: () => [],
      required: true
    },
    pagination: {
      type: Object || false,
      required: true,
      default: false
      // validator: function (keys: 'page' | 'pageSize' | 'total' | 'delete') {
      //   return keys === 'page'
      // }
    }
  },
  setup (props, ctx) {
    const loading = ref<boolean>(false)
    // const { get, post, put, del } = props.methods
    return () => (
      <>
        <a-row>
          <a-col></a-col>
          <a-col></a-col>
        </a-row>
        {/* <a-table
          columns={props.columns}
          loading={loading}
          pagination={props.pagination}
        >

        </a-table> */}
      </>
    )
  }
})
