import { defineComponent } from 'vue'
import { NoticeBar } from 'vant'
import styles from './index.module.less'

import MusicIcon from '../image/music.png'
import ArrowIcon from '../image/arrow.svg'

export default defineComponent({
  name: 'detail-title',
  props: {
    text: {
      type: String,
      default: ''
    },
    rightView: {
      type: Boolean,
      default: true,
    },
    onClick: {
      type: Function,
    } as any
  },
  render() {
    return (
      <div class={styles.container}>
        <NoticeBar
          text={this.text}
          color="#985131"
          class={styles.noticeBar}
          background="none"
        />
        {this.rightView ? (
          <img class={styles.status} src={ArrowIcon}/>
        ) : null}
      </div>
    )
  }
})
