import { Image,View } from "@tarojs/components"
import style from './index.module.less'
import Taro from "@tarojs/taro"
import { useAppStore } from "@/store/appStore";
interface Props{
  show: boolean
  onClose: ()=> void
}
export default ({ show, onClose }:Props)=> {
  const {setVipPopupVisible} = useAppStore()
  const nav2Vip = ()=> {
    setVipPopupVisible(false)
    Taro.switchTab({
      url: '/pages/member/index'
    })
  }
  if(show){
    return <>
      <View className={style.popupVip}>
        <View className={style.popupContent}>
          <View className={style.figureContainer}>
            <View className={`full-button-rounded ${style.viewButton}`} onClick={nav2Vip}>查看详情</View>
            <View className={`popup-close-button ${style.closeButton}`} onClick={onClose}></View>
            <Image className={style.figure} src="https://cdn.wehome.cn/cmn/png/124/META-H8UKVHWU-K4SOR0KW954A0B7Q6JXJ2-KW47NE1M-F8.png" mode="widthFix"></Image>
          </View>
        </View>
      </View>
    </>  
  }
  
  return <>
  </>
}