<template>
  <view class="more-tips bg-white border-box">
    <view class="font-size-0 whitespace-nowrap scroll-x">
      <view class="more-tips-item inline-block mr-[8px]" v-for="(item, index) in guideWords" :key="index">
        <text :class="['font-500 font-size-12 text-center', `color-${index}`]" @click="sendReply(item)">
          {{ item }}
        </text>
      </view>
    </view>
  </view>
</template>

<script setup>
import { SEND_MESSAGE_CONTENT_TEXT } from "@/constant/constant";
import { defineProps } from "vue";

defineProps({
  guideWords: {
    type: Array,
    default: [],
  },
});

const sendReply = (item) => {
  uni.$emit(SEND_MESSAGE_CONTENT_TEXT, item);
};
</script>

<style lang="scss" scoped>
@import "./styles/index.scss";
</style>
