<?php
/**
 * API Helper for Page Management
 * Provides functions to retrieve and manage pages
 */

require_once __DIR__ . '/helpers/navigation_helper.php';

/**
 * Get all pages in a format suitable for admin interface
 */
function getAllPagesForAdmin() {
    return NavigationHelper::getAllPages();
}

/**
 * Get featured pages
 */
function getFeaturedPages() {
    return NavigationHelper::getFeaturedPages();
}

/**
 * Get non-featured pages
 */
function getNonFeaturedPages() {
    return NavigationHelper::getNonFeaturedPages();
}

/**
 * Find page by ID
 */
function getPageById($id) {
    return NavigationHelper::getPageById($id);
}

/**
 * Find page by URL
 */
function getPageByUrl($url) {
    return NavigationHelper::getPageByUrl($url);
}

/**
 * Get page count
 */
function getPageCount() {
    $pages = NavigationHelper::getAllPages();
    return count($pages);
}

/**
 * Get featured page count
 */
function getFeaturedPageCount() {
    $pages = NavigationHelper::getFeaturedPages();
    return count($pages);
}

?>
