<?php
/**
 * مقدمة صفحة موحّدة لبوابة Smart Doctor
 * يعرّف قبل التضمين (اختياري): $doctorPageTitle, $doctorPageDesc, $doctorPageLinks (مصفوفة من ['href'=>..., 'label'=>...])
 */
$__pt = isset($doctorPageTitle) ? trim((string)$doctorPageTitle) : '';
$__pd = isset($doctorPageDesc) ? trim((string)$doctorPageDesc) : '';
$__pl = isset($doctorPageLinks) && is_array($doctorPageLinks) ? $doctorPageLinks : [];
if ($__pt === '' && $__pd === '' && $__pl === []) {
    return;
}
?>
<div class="doctor-page-intro">
    <?php if ($__pt !== ''): ?>
    <h1 class="doctor-page-intro__title"><?php echo htmlspecialchars($__pt, ENT_QUOTES, 'UTF-8'); ?></h1>
    <?php endif; ?>
    <?php if ($__pd !== ''): ?>
    <p class="doctor-page-intro__desc"><?php echo htmlspecialchars($__pd, ENT_QUOTES, 'UTF-8'); ?></p>
    <?php endif; ?>
    <?php if ($__pl !== []): ?>
    <nav class="doctor-page-intro__nav" aria-label="اختصارات الصفحة">
        <?php foreach ($__pl as $item): ?>
            <?php
            if (empty($item['href']) || empty($item['label'])) {
                continue;
            }
            ?>
        <a href="<?php echo htmlspecialchars($item['href'], ENT_QUOTES, 'UTF-8'); ?>"><?php echo htmlspecialchars($item['label'], ENT_QUOTES, 'UTF-8'); ?></a>
        <?php endforeach; ?>
    </nav>
    <?php endif; ?>
</div>
