<template>
  <div class="text-output">
    <div class="text-content" :class="{ 'streaming-text': action.streaming }">
      <div v-if="action.streaming" v-html="renderMarkdown(action.content, true)"></div>
      <div v-else v-html="renderMarkdown(action.content, false)"></div>
    </div>
  </div>
</template>

<script setup lang="ts">
defineOptions({ name: 'TextAction' });

defineProps<{
  action: any;
  renderMarkdown: (text: string, isStreaming?: boolean) => string;
}>();
</script>
