import { N as NavigationMenuWithItems } from './types-5XdVD2J1.js';
export { L as LinkPayload, a as NavigationItemRecord } from './types-5XdVD2J1.js';
import '@riverbankcms/ai';
import './schema-Bpy9N5ZI.js';
import 'zod';
import '@riverbankcms/media-storage-supabase';
import '@riverbankcms/db';

/**
 * Navigation helper utilities for SDK sites.
 *
 * Provides simple helpers to transform CMS navigation data into
 * render-ready NavItem arrays.
 *
 * @example
 * ```ts
 * import { getPrimaryNavItems, getNavItemsBySlug } from '@riverbankcms/sdk/navigation';
 *
 * // Get header navigation (primary menu)
 * const headerNav = getPrimaryNavItems(siteData.navigation);
 *
 * // Get footer navigation by slug
 * const footerNav = getNavItemsBySlug(siteData.navigation, 'footer');
 *
 * // Result: [{ href: '/', label: 'Home', isExternal: false }, ...]
 * ```
 *
 * @packageDocumentation
 */

/**
 * A simplified navigation item structure for component rendering.
 */
type NavItem = {
    /** The URL to navigate to */
    href: string;
    /** Display text for the navigation link */
    label: string;
    /** Whether link should open in new tab (external links) */
    isExternal: boolean;
};
/**
 * Get nav items from the primary menu (marked isPrimary, or first menu).
 * Returns empty array if no navigation configured.
 *
 * @example
 * ```ts
 * const headerNav = getPrimaryNavItems(siteData.navigation);
 * // [{ href: '/', label: 'Home', isExternal: false }, ...]
 * ```
 */
declare function getPrimaryNavItems(navigation: NavigationMenuWithItems[]): NavItem[];
/**
 * Get nav items from a specific menu by slug.
 * Useful for footer nav, secondary nav, etc.
 * Returns empty array if menu not found.
 *
 * @example
 * ```ts
 * const footerNav = getNavItemsBySlug(siteData.navigation, 'footer');
 * ```
 */
declare function getNavItemsBySlug(navigation: NavigationMenuWithItems[], slug: string): NavItem[];
/**
 * Get the primary navigation menu object.
 * Returns menu marked as isPrimary, or first menu if none marked.
 *
 * @example
 * ```ts
 * const menu = getPrimaryNavigation(siteData.navigation);
 * console.log(menu?.title); // "Main Navigation"
 * console.log(menu?.slug);  // "main"
 * ```
 */
declare function getPrimaryNavigation(navigation: NavigationMenuWithItems[]): NavigationMenuWithItems | null;
/**
 * Get a navigation menu by name.
 *
 * @example
 * ```ts
 * const footerMenu = getNavigationBySlug(siteData.navigation, 'footer');
 * ```
 */
declare function getNavigationBySlug(navigation: NavigationMenuWithItems[], slug: string): NavigationMenuWithItems | null;
/**
 * Transform a menu into NavItem array.
 * - Sorts by orderIndex
 * - Resolves link hrefs
 * - Identifies external links
 * - Filters out items without valid hrefs
 *
 * @example
 * ```ts
 * const menu = getNavigationBySlug(siteData.navigation, 'main');
 * const items = transformNavItems(menu);
 * ```
 */
declare function transformNavItems(menu: NavigationMenuWithItems | null): NavItem[];

export { type NavItem, NavigationMenuWithItems, getNavItemsBySlug, getNavigationBySlug, getPrimaryNavItems, getPrimaryNavigation, transformNavItems };
