<script setup lang="ts">
import { PropType } from 'vue';
import DataList from '@/components/DataList/DataList.vue';
import NoDataAvailable from '@/components/NoDataAvailable/NoDataAvailable.vue';

const detailsProps = defineProps({
  detailsData: {
    type: Array as PropType<any[]>,
    default: () => {
      return [];
    },
    required: true,
  },
});
</script>

<template>
  <div class="details-part-content">
    <div class="left-part">
      <img src="@/assets/common/image/details.svg" alt="" />
      <div class="title">{{ $t('FDM_INFO') }}</div>
    </div>

    <div v-if="detailsData.length" class="right-part">
      <DataList id="fdmDetails" :data-list="detailsData" />
    </div>
    <NoDataAvailable v-if="!detailsData.length" />
  </div>
</template>

<style scoped lang="scss">
.details-part-content {
  display: flex;
  align-items: center;
  position: relative;
  min-height: 104px;

  .left-part {
    padding: 0 75px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--o-border-color-light);

    .title {
      margin-top: 6px;
      color: var(--o-text-color-primary);
      font-size: 12px;
      line-height: 16px;
    }
  }

  .right-part {
    margin-left: -1px;
    padding-left: 72px;
    flex: 1;
    display: flex;
    border-left: 1px solid var(--o-border-color-light);
    position: relative;
  }
}
</style>
