import { Text, View } from '@tarojs/components'
import Taro from '@tarojs/taro'
import { memo } from 'react'
import classnames from 'classnames'
import AmountShow from '../amountShow'
import styles from './index.module.scss'
import MCheckbox from '@/components/checkbox'
import Popup from '@/components/popup'
import SearchInput from '@/components/searchInput'

interface Param {
  show?: true|false
  onClose?: () => void
}
export default memo(({ show = true, onClose }: Param) => {
  // 复制功能
  const clipboardData = () => {
    Taro.setClipboardData({
      data: '开户名称:佛山市浩川盛世科技有限公司;  开户银行:招商银行汾江支行;  转账汇款账号:62062342120001221231212',
      success(res) {
        Taro.showToast({
          icon: 'none',
          title: '复制成功',
        })
      },
    })
  }
  return (
    <View className={styles.offlinePay_main}>
      <Popup show={show} showTitle={false} onClose={onClose} >
        <View className={styles.offlinePay_con}>
          <View className={classnames('iconfont icon-a-moreback', styles.miconfont_title)} onClick={onClose}></View>
          <View className={styles.title}>线下汇款</View>
          <View className={styles.offlinePay_list}>
            <SearchInput showBorder={false} title="开户名称" titleStyle={{ fontSize: '23rpx' }}>
              <Text className={styles.offlinePay_con_text}>佛山市浩川盛世科技有限公司</Text>
            </SearchInput>
            <SearchInput showBorder={false} title="开户银行" titleStyle={{ fontSize: '23rpx' }}>
              <Text className={styles.offlinePay_con_text}>招商银行汾江支行</Text>
            </SearchInput>
            <SearchInput showBorder={false} title="转账汇款账号" titleStyle={{ fontSize: '23rpx' }}>
              <Text className={styles.offlinePay_con_text}>62062342120001221231212</Text>
            </SearchInput>
          </View>
          <View className={styles.btns} onClick={clipboardData}>复制信息</View>
        </View>
      </Popup>
    </View>

  )
})
