<template>
    <div :class="['bg-gray-800 min-h-14 p-3', $attrs.class]">
        <div class="flex flex-row items-center justify-between h-full">
            <!-- Left section -->
            <ToolbarSection :items="config.leftSection" />

            <!-- Right section -->
            <ToolbarSection :items="config.rightSection" />
        </div>
    </div>
</template>

<script setup>
    import ToolbarSection from './ToolbarSection.vue';

    defineProps({
        config: {
            type: Object,
            required: true,
            validator: value => {
                // Vérifie que leftSection et rightSection sont des tableaux
                return Array.isArray(value.leftSection) && Array.isArray(value.rightSection);
            }
        }
    });
</script>
