<?php

namespace Fotogenic_AI;

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

/**
 * Page query adapter — plain-array contract for WordPress pages.
 */
interface PageQueryAdapter {

    /**
     * List/search pages.
     *
     * @param string $q        Search query (title or ID).
     * @param int    $page     Page number (1-based).
     * @param int    $per_page Items per page.
     * @return array{items: array, totalItems: int, totalPages: int}
     */
    public function list_pages( string $q, int $page, int $per_page ): array;

    /**
     * Get page summary for list/cache.
     *
     * @param int $page_id Page ID.
     * @return array|null|\WP_Error Canonical source item with Page metadata and exact target snapshot; null if not found; WP_Error on failure.
     */
    public function get_page_summary( int $page_id );

}
