import React from 'react'
import styles from './index.module.scss'
import { baseFormData, topSearch } from '@/pages/Zother/data'
import { useSelector } from 'react-redux'
import { RootState } from '@/store'
import TableList from '@/pages/Zother/TableList'
import { B2_APIgetList } from '@/store/action/Benter/B2enterGuan'
import { baseTableC } from '@/utils/tableData'

const B2search = topSearch('入馆')

const B2baseFormData = baseFormData()

function B2enterGuan() {
  // 从仓库拿数据
  const tableInfo = useSelector((state: RootState) => state.B2enterGuan.tableInfo)

  return (
    <div className={styles.B2enterGuan}>
      <div className='pageTitle'>藏品入馆</div>

      <TableList
        baseFormData={B2baseFormData}
        getListAPI={B2_APIgetList}
        pageKey='enterGuan'
        tableInfo={tableInfo}
        columnsTemp={baseTableC('入馆')}
        yHeight={585}
        searchDom={B2search}
      />
    </div>
  )
}

const MemoB2enterGuan = React.memo(B2enterGuan)

export default MemoB2enterGuan
