<?php
/**
 * sales_tabs.php
 * Full-width tabs bar (RTL) - no iframes
 * Usage: set $active_tab then include this file.
 */
if (!isset($active_tab)) $active_tab = '';
$tabs = [
  'summary' => ['label' => 'الملخص', 'href' => 'sales_summary.php'],
  'sales' => ['label' => 'المبيعات', 'href' => 'sales.php'],
  'new' => ['label' => 'إضافة بيع', 'href' => 'sales_new.php'],
  'products' => ['label' => 'المنتجات', 'href' => 'sales_products.php'],
  'history' => ['label' => 'سجل المبيعات', 'href' => 'sales_history.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>
