<?php
declare(strict_types=1);
require_once dirname(__DIR__) . '/includes/layout.php';
crm_page_start('CRM Masters', 'masters', 'Configuration');
?>
<div class="master-section-heading" id="crm-config">
    <div><span>01</span><h2>CRM Config</h2></div>
    <p>Lead classification and pipeline configuration</p>
</div>
<section class="master-grid" aria-label="CRM master data">
    <?php foreach (crm_master_catalogue() as $master): ?>
        <a class="master-card" href="<?= crm_e(crm_url($master['path'])) ?>" aria-label="Open <?= crm_e($master['title']) ?>">
            <span class="master-icon"><i class="fa-solid <?= crm_e($master['icon']) ?>"></i></span>
            <h2><?= crm_e($master['title']) ?></h2>
            <p><?= crm_e($master['description']) ?></p>
            <i class="fa-solid fa-arrow-right arrow"></i>
        </a>
    <?php endforeach; ?>
</section>
<div class="master-section-heading" id="region-config">
    <div><span>02</span><h2>Region Config</h2></div>
    <p>State, district, taluka and locality hierarchy</p>
</div>
<section class="master-grid" aria-label="CRM region master data">
    <?php foreach (crm_region_catalogue() as $master): ?>
        <a class="master-card" href="<?= crm_e(crm_url($master['path'])) ?>" aria-label="Open <?= crm_e($master['title']) ?>">
            <span class="master-icon"><i class="fa-solid <?= crm_e($master['icon']) ?>"></i></span>
            <h2><?= crm_e($master['title']) ?></h2>
            <p><?= crm_e($master['description']) ?></p>
            <i class="fa-solid fa-arrow-right arrow"></i>
        </a>
    <?php endforeach; ?>
</section>
<?php crm_page_end(); ?>
