<template>
    <div class="base-container">
        <div class="base-left">
            <div class="logo">
                <img class="logo-icon" src="@/assets/images/home/logo.png" alt="">
                <el-divider class="divider" direction="vertical" />
                <div class="text">PROCESSED PINE DRONE AI</div>
            </div>
        </div>
        <div class="base-right">
            <div class="title">Process Pine</div>
            <div class="card-list">
                <div class="card-item" @click="hanldePage('Plant')">
                    <img class="card-icon-1" src="@/assets/images/home/card-icon-1.png" alt="">
                    <span>Plant Population</span>
                </div>
                <div class="card-item ml" @click="hanldePage('Flowering')">
                    <div class="img">
                        <img class="card-icon-2" src="@/assets/images/home/card-icon-2.png" alt="">
                    </div>
                    <span>Flowering Rate</span>
                </div>
                <!-- <div class="card-item">
                    <img class="card-icon-3" src="@/assets/images/home/card-icon-3.png" alt="">
                    <span>Plant Water Deficiencies</span>
                </div> -->
            </div>
            <div class="version">Version V1.0.0</div>
        </div>
    </div>
</template>

<script setup>
import { ref } from "vue";
import { useRouter } from "vue-router";
const router = useRouter();

const hanldePage = (type) =>{
    router.push(`/layout?type=${type}`)
}
</script>

<style lang="scss" scoped>
.base-container {
    width: 100%;
    height: 100vh;
    display: flex;
    .base-left{
        width: calc(100% - 500px);
        height: 100%;
        background: url('@/assets/images/home/main-bg.png') no-repeat center center /100% 100%;
        padding: 22px 30px;
        box-sizing: border-box;
        .logo{
            display: flex;
            align-items: center;
            .logo-icon{
                width: 107px;
                height: 56px;
            }
            .divider{
                height: 16px;
                border-color: rgba(255, 255, 255, 0.3);
                border-width: 2px;
                margin: 15px 16px 0 18px;
            }
            .text{
                font-size: 24px;
                color: #fff;
                margin-top: 15px;
            }
        }
    }
    .base-right{
        width: 500px;
        height: 100%;
        padding: 28px 24px;
        box-sizing: border-box;
        position: relative;
        .title{
            border-bottom: 1px solid #D9D9D9;
            padding-bottom: 16px;
            font-size: 24px;
            font-weight: bold;
        }
        .card-list{
            margin-top: 32px;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            width: 100%;
            .card-item{
                background: #f7f7f7;
                border-radius: 8px;
                padding: 18px;
                box-sizing: border-box;
                display: flex;
                align-items: center;
                justify-content: center;
                flex-direction: column;
                width: 47%;
                height: 269px;
                margin-bottom: 24px;
                cursor: pointer;
                span{
                    margin-top: 15px;
                }
                .card-icon-1{
                    width: 118px;
                    height: 195px;
                }
                .img{
                    width: 168px;
                    height: 195px;
                    display: flex;
                    align-items: center;
                }
                .card-icon-2{
                    width: 100%;
                    height: 168px;
                }
                .card-icon-3{
                    width: 152px;
                    height: 152px;
                }
            }
            .ml{
                margin-left: 24px;
            }
        }
        .version{
            position: absolute;
            bottom: 12px;
            right: 12px;
            font-size: 16px;
        }
    }
}
</style>
