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 { D2API_obj } from '@/store/action/Dmanage/D2edit'
import FileArchive from '@/pages/Zother/FileArchive'
import EditBtn from '@/pages/Zother/EditBtn'
import D2info from '../D2info'

const rowArr = rowArrTemp('修改')

function D2editSon() {
  return (
    <InfoProvider>
      <div className={styles.D2edit} id='editBox'>
        <div className='editMain'>
          {/* 顶部 */}
          <EditTop
            pageTxt='藏品修改'
            rowArr={rowArr}
            APIobj={D2API_obj}
            fileUpInfo={{ myUrl: 'cms/order/edit/upload', dirCode: 'goodEdit' }}
          />

          {/* 详情 */}
          <D2info />

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

          {/* 底部按钮 */}
          <EditBtn path='/edit' APIobj={D2API_obj} checkListTxt='请选择关联藏品' isEdit={true} />
        </div>
      </div>
    </InfoProvider>
  )
}

const MemoD2editSon = React.memo(D2editSon)

export default MemoD2editSon
