import Popup from '@/components/Popup'
import Taro from '@tarojs/taro'
import touristON from '@/assets/icons/UserCenter/touristON.png'
import touristOFF from '@/assets/icons/UserCenter/touristOFF.png'
import hotelBossON from '@/assets/icons/UserCenter/hotelBossON.png'
import hotelBossOFF from '@/assets/icons/UserCenter/hotelBossOFF.png'
import shopBossON from '@/assets/icons/UserCenter/shopBossON.png'
import shopBossOFF from '@/assets/icons/UserCenter/shopBossOFF.png'

const goToHotel = () => {
  Taro.redirectTo({ url: '/hotel/pages/landlord/landlord' })
}
const goToShop = () => {
  Taro.redirectTo({ url: '/shop/pages/spread/spreadIndex' })
}

export default (props) => {
  const { show, maskClosable } = props

  return (

    <Popup show={show} maskClosable={maskClosable}>
      <view className='User-box-sths' >
        <view className='User-box-selectUser'>请选择身份：</view>
        <view className='User-box-tourist' >
          <image className='Ubs-tourist-image' src={touristON} />
          <text className='Ubs-tourist-text'>游客</text>
        </view>
        <view className='User-box-hotelBoss' onClick={goToHotel}>
          <image className='Ubs-hotelBoss-image' src={hotelBossOFF} />
          <text className='Ubs-hotelBoss-text'>民宿老板</text>
        </view>
        <view className='User-box-shopBoss' onClick={goToShop}>
          <image className='Ubs-shopBoss-image' src={shopBossOFF} />
          <text className='Ubs-shopBoss-text'>店铺老板</text>
        </view>
      </view>
    </Popup>
  )
}

