<?php
/**
 * messages_tabs.php
 * Unified navigation for message center pages only.
 */
if (!isset($active_tab)) $active_tab = '';
$tabs = [
  'outbox'    => ['label' => 'صندوق الإرسال', 'href' => 'messages_outbox.php'],
  'campaigns' => ['label' => 'حملات الرسائل', 'href' => 'messages_campaigns.php'],
  'log'       => ['label' => 'سجل الرسائل', 'href' => 'message_log.php'],
  'templates' => ['label' => 'قوالب الرسائل', 'href' => 'messages_templates.php'],
  'device_alerts' => ['label' => 'تنبيهات الأجهزة', 'href' => 'device_admin_alerts.php'],
  'provider'  => ['label' => 'إعدادات SMS', 'href' => 'settings_sms.php'],
  'whatsapp'  => ['label' => 'واتساب Cloud', 'href' => 'settings_whatsapp.php'],
];
?>
<div class="ua-atabs-wrap"><div class="ua-atabs" role="tablist" aria-label="تبويبات الرسائل">
<?php foreach ($tabs as $k => $t): ?>
<a class="ua-atab <?= ($active_tab === $k ? 'is-active' : '') ?>" href="<?= htmlspecialchars($t['href'], ENT_QUOTES, 'UTF-8') ?>" role="tab" aria-selected="<?= ($active_tab === $k ? 'true' : 'false') ?>"><?= htmlspecialchars($t['label'], ENT_QUOTES, 'UTF-8') ?></a>
<?php endforeach; ?>
</div></div>

