import { defineComponent } from 'vue'
import { Image, Button } from 'vant'
import downloadBg from '../images/popup-download_bg.png'
import styles from './index.module.less'

export default defineComponent({
  name: 'download-popup',
  props: {
    buttonText: {
      type: String,
      default: '下载酷乐秀'
    }
  },
  emits: ['confirm'],
  setup(props, { emit }) {
    return () => (
      <div class={styles.download}>
        <Image src={downloadBg} class={styles.img} />

        <Button
          round
          class={styles.downloadBtn}
          onClick={() => emit('confirm')}
        >
          {props.buttonText}
        </Button>
      </div>
    )
  }
})
