import {PageProvider, SearchProvider, TableSearchProvider} from '@components';
import {FC} from 'react';
import {PRELOAD_KEY, context, pageContext, searchContext} from './context';
import TableList from './table';
import {MODAL_PAGE_SIZE_LIST} from '@utils';

const DeliverTraceSnList: FC<{id: string}> = function ({id}) {
  return (
    <TableSearchProvider context={context} state={{trackId: id}}>
      <SearchProvider context={searchContext} preloadKey={PRELOAD_KEY}>
        <PageProvider
          context={pageContext}
          initPageSize={MODAL_PAGE_SIZE_LIST[0]}
          preloadKey={PRELOAD_KEY}
        >
          <section className='content-main'>
            <TableList />
          </section>
        </PageProvider>
      </SearchProvider>
    </TableSearchProvider>
  );
};

export default DeliverTraceSnList;
