<template>
  <div class="description">
    <div class="main-takeaways">
      <div class="title">Main Takeaways</div>
      <!-- eslint-disable vue/no-v-html -->
      <div class="content" v-html="post.takeaways"></div>
      <!--eslint-enable-->
    </div>
    <div class="summary">
      <div class="title">Summary</div>
      <!-- eslint-disable vue/no-v-html -->
      <div class="content" v-html="post.summary"></div>
      <!--eslint-enable-->
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent, PropType } from 'vue';
import type { CaseStudiesInterface } from '@/database/case-studies/caseStudies.types';

export default defineComponent({
  props: {
    post: {
      type: Object as PropType<CaseStudiesInterface.PostPreview>,
      required: true,
    },
  },
});
</script>

<style lang="scss" scoped>
.description {
  height: 171px;

  .title {
    margin-bottom: 8px;

    color: #d0d1d2;
    font-weight: 700;
    font-size: 18px;
    line-height: 144%;
  }

  .content {
    display: -webkit-box;
    overflow: hidden;

    color: #3c3d3e;

    font-weight: 400;
    font-size: 14px;
    line-height: 192%;

    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }

  .main-takeaways {
    margin-bottom: 35px;
  }
}
</style>
