// const _ = require('./utils')

Component({
  properties: {
    id: {
      type: String,
    },
    style: {
      type: String,
    },
    lang: {
      type: String,
    },
    businessId: {
      type: Number,
    },
    sessionFrom: {
      type: String,
    },
    sendMessageTitle: {
      type: String,
    },
    sendMessagePath: {
      type: String,
    },
    sendMessageImg: {
      type: String,
    },
    showMessageCard: {
      type: Boolean,
    },
    appParameter: {
      type: String,
    },
    ariaLabel: {
      type: String,
    },
    openType: {
      type: String,
    },
    icon: {
      type: String,
    },
    plain: {
      type: Boolean,
    },
    block: {
      type: Boolean,
    },
    round: {
      type: Boolean,
    },
    square: {
      type: Boolean,
    },
    loading: {
      type: Boolean,
    },
    hairline: {
      type: Boolean,
    },
    disabled: {
      type: Boolean,
    },
    loadingText: {
      type: String,
    },
    customStyle: {
      type: String,
    },
    loadingType: {
      type: String,
      value: 'circular',
    },
    type: {
      type: String,
      value: 'primary',
    },
    size: {
      type: String,
      value: 'normal',
    },
    loadingSize: {
      type: String,
      value: '20px',
    },
    color: {
      type: String,
    },
  },
  data: {},
  // lifetimes: {
  //   attached() {
  //     wx.getSystemInfo({
  //       success: () => {
  //         this.setData({
  //           flag: _.getFlag(),
  //         })
  //       }
  //     })
  //   }
  // }
  methods: {
    handleClick() {
      this.triggerEvent('click')
    },
    handleGetUserInfo(event) {
      console.log(1, event)
      this.triggerEvent('getuserinfo', event)
    },
  },
})
