import React from 'react'
import styles from './index.module.scss'
import { rowArrTemp } from '@/pages/Zother/data'
import { InfoProvider } from '@/pages/Zother/InfoContext'
import EditTop from '@/pages/Zother/EditTop'
import { B4_APIgetClueList, B4API_obj } from '@/store/action/Benter/B4enterCang'
import EditBtn from '@/pages/Zother/EditBtn'
import SonGoodsList from '@/pages/Zother/SonGoodsList'
import FileArchive from '@/pages/Zother/FileArchive'

const rowArr = rowArrTemp('入藏')

function B4edit() {
  return (
    <InfoProvider>
      <div className={styles.B4edit} id='editBox'>
        <div className='editMain'>
          {/* 顶部 */}
          <EditTop
            pageTxt='藏品入藏'
            rowArr={rowArr}
            APIobj={B4API_obj}
            fileUpInfo={{ myUrl: 'cms/order/hide/upload', dirCode: 'enterCang' }}
          />

          {/* 藏品清单 */}
          <SonGoodsList
            selectApi={B4_APIgetClueList}
            isClueSelect={false}
            btnTxt='从已入馆藏品中添加'
            addShow={false}
          />

          {/* 附件归档 */}
          <FileArchive />

          {/* 底部按钮 */}
          <EditBtn path='/enterCang' APIobj={B4API_obj} checkListTxt='请添加藏品' />
        </div>
      </div>
    </InfoProvider>
  )
}

const MemoB4edit = React.memo(B4edit)

export default MemoB4edit
