<script>
export default {
  name: "lemonMessageVoice",
  inheritAttrs: false,
  inject: ["IMUI"],
  data() {
    return {

    };
  },
  created() {

  },
  render() {
    return (
      <lemon-message-basic
        class="lemon-message-voice"
        props={{ ...this.$attrs }}
        scopedSlots={{
          content: props => {
            return  this.renderHtml(props);
          }
        }}
      />
    );
  },
   methods: {
      renderHtml(data){
        return <audio block="true" showDuration='false' duration={data.duration} controls src={data.content}  ></audio>;
        // return <span>{props.content}&nbsp;🔈</span>;
      }
  }
};
</script>

<style lang="scss">

.lemon-message.lemon-message-voice {
  user-select: none;
  .lemon-message__content {
    border: 0px solid #000;
    font-size: 12px;
    cursor: pointer;
    &::before {
      display: none;
    }
  }
}

</style>
