import React from "react";
import DataTable from "../../../../Layout/Dashboard/Table/DataTable";
import { useColumns } from "./useTableColumns";
import useSearchQuery from "../../../../api/utils/useSearchQuery";
import { useFilterState } from "../../../../Components/Utils/Filter/FilterState";
import { useGetAllCollections } from "../../../../api/collections";
import { useParams } from "react-router-dom";

const App: React.FC = () => {
  const [searchQuery] = useSearchQuery("name");
  const { filterState } = useFilterState();
  const {collection_id}= useParams()
  console.log(collection_id);
  
  const response = useGetAllCollections({
    name: searchQuery,
    pagination: true,
    ...filterState,
    show:collection_id
  });

  return <DataTable response={response} useColumns={useColumns} dataSource={[]} />;
};

export default App;
