<template>
    <div class="commentSectorBox">
        <div class="commentSector">
            <div class="commentSectorLeft">
                <div v-if="skinId == 5">
                    <left1Style 
                        :titleLink="componentTitle1" 
                        :templateData="templateData[0].componentData.data"
                        :componentStyle="templateData[0].component_style"
                    />
                </div>
            </div>
            <div class="commentSectorRight">
                <div v-if="skinId == 5">
                    <right1Style 
                        :titleLink="componentTitle2" 
                        :templateData="templateData[1].componentData.data" 
                        :componentStyle="templateData[1].component_style"
                    />
                </div>
            </div>
        </div>
    </div>
</template>

<script setup>
//左侧顶部组件皮肤1
import left1Style from '@/components/template/component/list/585x500/2.vue'
//右侧组件皮肤1
import right1Style from '@/components/template/component/list/585x500/2.vue'

//暂无数据
import nodata from '@/components/template/component/public/nodata.vue'
const props = defineProps({
    skinId: Number,//皮肤id
    templateData: Object,//新闻数据
});
//该栏目下有三个组件 此时需要提供children_count来判断是否跳转到频道页
const componentTitle1 = {
    alias: props.templateData[0].componentData.data.alias,
    aLIas_pinyin: props.templateData[0].componentData.data.pinyin,
    is_url: props.templateData[0].componentData.data.is_url ?? 0,//如果is_url为空 则默认为0
    children_count: props.templateData[0].componentData.data.children_count ?? 0,//如果children_count为空 则默认为0
    cid: props.templateData[0].componentData.data.category_id
}
const componentTitle2 = {
    alias: props.templateData[1].componentData.data.alias,
    aLIas_pinyin: props.templateData[1].componentData.data.pinyin,
    is_url: props.templateData[1].componentData.data.is_url ?? 0,//如果is_url为空 则默认为0
    children_count: props.templateData[1].componentData.data.children_count ?? 0,//如果children_count为空 则默认为0
    cid: props.templateData[1].componentData.data.category_id
}

</script>

<style scoped lang="less">
//基本样式 start ---------------------------------------->
.commentSectorBox {
    width: 100%;
    height: 500px;
    margin-bottom: 30px;

    .commentSector {
        width: 1200px;
        height: 500px;
        margin: 0 auto;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        box-sizing: content-box;

        .commentSectorLeft {
            width: 585px;
            height: 500px;

        }

        .commentSectorRight {
            width: 585px;
            height: 500px;
        }
    }
}

//基本样式 end ----------------------------------------></style>
