<template>
  <UiContainer class="space-y-[50px] sm:space-y-[30px] xl:space-y-[100px]">
    <div class="space-25-55">
      <div class="space-25-75">
        <h4 class="h4-uppercase-bold-inter">
          {{ component.front_section_lang[0].data.main_title }}
        </h4>
        <div
          class="w-full h-full flex flex-col items-stretch gap-4 xl:flex-row space-25-55 xl:!space-y-0"
        >
          <div
            class="flex flex-col space-y-[55px] xl:space-y-0 xl:justify-between"
          >
            <p>{{ component.front_section_lang[0].data.main_description }}</p>
            <p>{{ component.front_section_lang[0].data.section_title }}</p>
            <ul>
              <li
                v-for="(item, index) in component.front_section_lang[0].data
                  .section_items"
                :key="index"
                class=""
              >
                <span>{{ index + 1 }}. </span>{{ item }}
              </li>
            </ul>
          </div>
          <div
            class="w-full xl:max-w-[690px] h-[200px] sm:h-[390px] block rounded-2xl"
            :style="{
              backgroundImage: `url('/api/public/file/${component.img[0]}_l.webp')`,
              backgroundSize: 'cover',
              backgroundPosition: 'center',
            }"
          />
        </div>
      </div>
      <div class="flex items-center justify-center w-[100%] xl:w-[90%] mx-auto">
        <div class="flex flex-col items-center p-3 sm:p-6 md:p-8 xl:p-11 border border-block rounded-2xl gap-5">
          <h4 class="h4-uppercase-bold-inter text-accent-green-light dark:text-accent-green-dark">
            20 {{ $t("years") }}
          </h4>
          <img class="dark:hidden" :src="`/api/public/chart?second_color=000&base_color=c7c7c7&width=1800&height=480`" alt="">
          <img class="hidden dark:block" :src="`/api/public/chart?second_color=fff&base_color=9a7f62&width=1800&height=480`" alt="">
        </div>
      </div>
    </div>
    <div class="flex flex-col gap-4 xl:flex-row space-25-55">
      <div class="flex flex-col space-25-55 xl:justify-between">
        <p>{{ component.front_section_lang[0].data.info_description }}</p>
        <h4 class="h4-uppercase-bold-inter">
          {{ component.front_section_lang[0].data.info_title }}
        </h4>
        <div
          class=""
          v-html="component.front_section_lang[0].data.info_description_second"
        />
      </div>
      <div
        class="w-full xl:max-w-[690px] h-[170px] sm:h-[360px] block rounded-2xl"
        :style="{
          backgroundImage: `url('/api/public/file/${component.img[1]}_l.webp')`,
          backgroundSize: 'cover',
          backgroundPosition: 'center',
        }"
      />
    </div>
  </UiContainer>
</template>

<script lang="ts" setup>
defineProps<{
  component: {
    id: number
    name: string
    img: string[]
    component_name: string
    is_no_lang: boolean
    page_name: string
    front_section_lang: {
      data: {
        main_title: string
        main_description: string
        section_title: string
        section_items: string[]
        info_title: string
        info_description: string
        info_description_second: string
      }
      id_front_section: number
      id_lang: number
    }[]
  }
}>()
</script>
