@props(['params'])

@if (count($params) > 0)
    <div class="mt-6 overflow-x-auto">
        <table class="w-full text-left text-sm">
            <thead>
                <tr class="border-b border-gray-200 dark:border-white/10">
                    <th class="px-3 py-2.5 text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400">Parametre</th>
                    <th class="px-3 py-2.5 text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400">Type</th>
                    <th class="px-3 py-2.5 text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400">Obligatoire</th>
                    <th class="px-3 py-2.5 text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400">Description</th>
                </tr>
            </thead>
            <tbody class="divide-y divide-gray-100 dark:divide-white/5">
                @foreach ($params as $param)
                    <tr>
                        <td class="px-3 py-2.5 font-mono text-sm text-gray-700 dark:text-gray-300">{{ $param['name'] }}</td>
                        <td class="px-3 py-2.5 text-sm text-gray-700 dark:text-gray-300">{{ $param['type'] }}</td>
                        <td class="px-3 py-2.5 text-sm text-gray-700 dark:text-gray-300">{{ $param['required'] }}</td>
                        <td class="px-3 py-2.5 text-sm text-gray-700 dark:text-gray-300">{{ $param['description'] }}</td>
                    </tr>
                @endforeach
            </tbody>
        </table>
    </div>
@endif
