import React from 'react'

import css from './searchPanel.scss'

class Panel extends React.Component {
  constructor(props) {
    super(props);
    this.state = {}
  }


  render() {
    const {children, title, selectDate, num = 0, time = 0, lang, addTitle} = this.props;
    let floatTime = time / 1000;
    floatTime = floatTime.toFixed(3);
    return (
      <div className={`${css['ks-search-panel']}`}>
        <div className={css.head}>
          {/*<span*/}
          {/*className={css.title}>{`${lang.beforeSearchTip} ${num > 99 ? "99+" : num} ${lang.afterSearchTip}，${lang.beforeSearchTime} ${floatTime} ${lang.afterSearchTime}`}</span>*/}
          <span
            className={css.title}>{`${lang.beforeSearchTip} ${num > 99 ? "99+" : num} ${lang.afterSearchTip}`}</span>
          {addTitle ? <span className={`s-primary ${css.addTitle}`}>{lang.note}</span> : null}
          <div className={css.date}>
            {selectDate}
          </div>
        </div>
        <div className={`${css.body} s-bg-container s-br-normal s-b-default`}>
          {children}
        </div>
      </div>
    )
  }


}

export default Panel;