<template>
  <div
    v-bind:style="
      type === 'positive'
        ? 'border: 1px solid #C0D3FF'
        : 'border: 1px solid #FFDAD3'
    "
    class="review-analysis-box-wrapper"
  >
    <div class="review-analysis-box-info-wrapper">
      <div class="review-analysis-box-tag-wrapper">
        <img
          v-bind:src="
            type === 'positive'
              ? 'https://nosearch.com/static/images/positive_smile.png'
              : 'https://nosearch.com/static/images/negative_upset.png'
          "
          class="review-analysis-summary-icon"
        />
        <span
          v-bind:style="
            type === 'positive' ? 'color: #6191FF' : 'color: #FF6861'
          "
          class="review-analysis-box-tag-title"
          >{{ type === "positive" ? "긍정" : "부정" }} 리뷰</span
        >
      </div>
      <span class="review-analysis-box-tag-date"
        >{{ date.substr(0, 7) }} 작성</span
      >
    </div>
    <p class="review-analysis-box-text">
      {{ text }}
    </p>
  </div>
</template>

<script>
export default {
  name: "reviewAnalysisBox",
  props: {
    type: String,
    date: String,
    text: String,
  },
};
</script>

<style></style>
