import { View } from '@tarojs/components'
import classNames from 'classnames'
import styles from './index.module.scss'

export type BottomItem = 'del'|'preview'|'save'
interface Param {
  onClick?: (val: BottomItem) => void
  delStatus: boolean
}
export default (props: Param) => {
  const { onClick, delStatus } = props
  return <View>
    <View className={styles.bottom_btn}>
      {delStatus && <View className={classNames(styles.bottom_btn_item, styles.del_btn)} onClick={() => onClick?.('del')}>删除码单</View>}
      <View className={styles.bottom_btn_item} onClick={() => onClick?.('preview')}>预览码单</View>
      <View className={styles.bottom_btn_item} onClick={() => onClick?.('save')}>保存码单</View>
    </View>
    <View className="common_safe_area_y"></View>
  </View>
}
