import React, {Component} from 'react'
//import FileList from 'kara-module-file-list'
//import 'kara-module-file-list/lib/index.css'
import {FileList} from 'karaui'
import Panel from '../../../common/panel/panel'


class File extends Component {
  render() {
    const {data, httpAgent, contentRef, lang, onMore, isLast,isFixed} = this.props
    const {count = 0} = data
    if (count === 0) {
      return null
    }
    return <Panel title={`${lang.msgFile}（${count > 99 ? "99+" : count}${lang.item}）`} onMore={onMore} lang={lang}
                  isLast={isLast ? isLast : null} isFixed={isFixed ? isFixed : null}>
      {contentRef.current ? <FileList data={data} httpAgent={httpAgent} modalParent={contentRef.current}/> : null}
    </Panel>
  }

}

export default File;