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 { D3_APIgetClueList, D3API_obj } from '@/store/action/Dmanage/D3writeOff'
import SonGoodsList from '@/pages/Zother/SonGoodsList'
import EditBtn from '@/pages/Zother/EditBtn'
import FileArchive from '@/pages/Zother/FileArchive'

const rowArr = rowArrTemp('注销')

function D3edit() {
  return (
    <InfoProvider>
      <div className={styles.D3edit} id='editBox'>
        <div className='editMain'>
          {/* 顶部 */}
          <EditTop
            pageTxt='藏品注销'
            rowArr={rowArr}
            APIobj={D3API_obj}
            fileUpInfo={{ myUrl: 'cms/orderLogout/upload', dirCode: 'writeOff' }}
          />

          {/* 藏品清单 */}
          <SonGoodsList
            selectApi={D3_APIgetClueList}
            isClueSelect={false}
            btnTxt='选择藏品'
            addShow={false}
          />

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

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

const MemoD3edit = React.memo(D3edit)

export default MemoD3edit
