<script setup lang="ts">
import {Link} from "@inertiajs/vue3";
import {number} from "echarts";
defineProps<{
    missingLiveryCount: number;
    missingAirlineCount: number;
}>()
</script>

<template>
    <aside class="glass admin-sidebar">
        <div class="sidebar-title">Admin</div>
        <Link :href="route('admin.dashboard')" class="sidebar-link">
            <v-icon icon="mdi-chart-line" size="18" />
            Dashboard
        </Link>
        <Link v-if="missingLiveryCount" :href="route('admin.reconcile-missing-liveries')" class="sidebar-link">
            <v-icon icon="mdi-airplane-takeoff" size="18" />
            Reconcile Missing Liveries
            <v-chip  size="x-small" color="error" class="ml-1">{{ missingLiveryCount }}</v-chip>
        </Link>
        <Link :href="route('admin.reconcile-missing-airlines')" class="sidebar-link">
            <v-icon icon="mdi-airplane-takeoff" size="18" />
            Reconcile Missing Airlines
            <v-chip  size="x-small" color="error" class="ml-1">{{ missingAirlineCount }}</v-chip>
        </Link>
    </aside>
</template>

<style scoped>
.admin-sidebar {
    width: 400px;
    flex-shrink: 0;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    /* no height here */
}

.sidebar-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text);
    opacity: 0.5;
    padding: 0 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}

.sidebar-link {
    display: flex;
    width: 100%;
    height: 2.5rem;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s ease;
}

.sidebar-link:hover {
    color: var(--accent);
    background: rgba(56, 189, 248, 0.07);
}

.sidebar-link.active {
    font-weight: 500;
}
</style>
