{* ============================================
   ADMIN2000 - List Items Template
   AJAX Response für Tabellen-Daten
   ============================================ *}

{if $list_data.list_items}
	{foreach from=$list_data.list_items item=row}
	<tr data-id="{$row.object_id}">
		{foreach from=$row name=ObjectLoop item=field}
		{if !$smarty.foreach.ObjectLoop.first}
		<td>{$field}</td>
		{/if}
		{/foreach}
		<td class="admin2000-table-actions">
			<a href="./index.php?admin_modul=admin2000&section=stammdaten&page=kunden_editor&id={$row.object_id}" class="admin2000-btn-small">
				Bearbeiten
			</a>
		</td>
	</tr>
	{/foreach}
{else}
	<tr>
		<td colspan="100">
			<div class="admin2000-empty-state">
				<div class="admin2000-empty-icon">📭</div>
				<h3>Keine Kunden gefunden</h3>
				<p>Es wurden keine Kunden gefunden, die den Suchkriterien entsprechen.</p>
			</div>
		</td>
	</tr>
{/if}

{* Data attributes for pagination - will be read by JavaScript *}
<tr style="display:none;" class="admin2000-pagination-data" data-count="{$list_data.count_list_items|default:0}" data-page="{$list_data.actual_page|default:1}" data-pages="{$list_data.count_pages|default:1}" data-sort="{$list_data.sort_item|default:''}"></tr>
