import React from 'react';
import styles from './index.less';

import BackButton from '../BackButton/BackButton';
import TitleGet from '../TitleGet/TitleGet';

const TitleBack = (props: any) => {
  //   <TitleBack sublist={['Handle Status : '+CurDataDetail.status,'Create Time : '+CurDataDetail.time]} title={headTitle} />

  const backData = (values: any) => {
    props.titleBack(values)
  }
  return (
    <>
      <div className={styles.item0}><TitleGet title={props.title} /></div>
      {
        props.sublist != null && props.title == "Edit Owner Infomation"
          ?
          (props.sublist).map((item: any, index: any) => {
            return (
              <div key={index} className={styles.item1}>{item}</div>
            )
          })
          :
          <></>
      }
      <div className={styles.item2}><BackButton backFunction={backData} url={props.url} /></div>
      <div className={styles.clear0}></div>
    </>
  );
};

export default TitleBack;
