<script setup lang="ts">
import { getComponentGroup } from '#layers/utils/dataUtil'

interface Props {
  components: Record<string, any>
  pageVerTmplSeq: string
}

const props = defineProps<Props>()

const backgroundData = computed(() =>
  getComponentGroup(props.components, 'background')
)
const mainTitleData = computed(() =>
  getComponentGroup(props.components, 'mainTitle')
)
const slideThumbnailData = computed(() => props.components.group_sets)
const videoPlayData = computed(() =>
  getComponentGroup(props.components, 'videoPlay')
)
</script>

<template>
  <section class="section-container">
    <WidgetsBackground v-if="backgroundData" :resources-data="backgroundData" />
    <div class="section-content">
      <WidgetsMainTitle
        v-if="mainTitleData"
        :resources-data="mainTitleData"
        class="title-sm"
      />
      <BlocksSlideThumbnail
        :slide-item-list="slideThumbnailData"
        :video-play="videoPlayData"
        class="mt-[24px] md:mt-[32px]"
      />
    </div>
  </section>
</template>
