<template>
  <div class="rendered-tags" :style="component.style">
    <span v-for="(tag, index) in component.tags" :key="index">{{ tag }}</span>
    <span v-if="!component.tags || component.tags.length === 0">Tag 1</span>
    <span v-if="!component.tags || component.tags.length === 0">Tag 2</span>
  </div>
</template>

<script setup>
import { defineProps } from 'vue';

const props = defineProps({
  component: Object,
});
</script>

<style scoped>
.rendered-tags {
  width: 100%;
  height: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  border: 1px dashed var(--border-color);
  color: var(--text-color-darker);
  padding: 0.5rem;
  box-sizing: border-box;
  background-color: var(--bg-color); /* Added for better visibility */
  border-radius: var(--border-radius); /* Added for rounded corners */
}
.rendered-tags span {
  background-color: var(--panel-color);
  color: var(--text-color);
  padding: 0.2rem 0.5rem;
  border-radius: var(--border-radius);
  margin: 0 0.2rem 0.2rem 0; /* Add bottom margin for wrapping */
  font-size: 0.8rem;
  border: 1px solid var(--border-color);
}
</style>
