import type { CoreOptions } from '@vuecs/core';
import type { ElementType } from './constants';
import type { NavigationRegistryEntry } from './registry/types';
export type NavigationOrientation = 'horizontal' | 'vertical';
/**
* How an item with children renders its submenu. `auto` derives from
* orientation (horizontal → dropdown, otherwise collapse).
*/
export type NavigationSubmenu = 'auto' | 'collapse' | 'dropdown';
/** The resolved submenu presentation (after `auto` is decided). */
export type NavigationSubmenuMode = 'collapse' | 'dropdown';
export type NavigationItem = {
name: string;
url?: string;
urlTarget?: '_self' | '_blank' | '_parent' | '_top' | string;
default?: boolean;
type?: `${ElementType}`;
icon?: string;
active?: boolean;
activeMatch?: string;
display?: boolean;
displayChildren?: boolean;
children?: NavigationItem[];
meta?: META;
};
export type NavigationItemNormalized = Omit, 'name' | 'children' | 'meta'> & {
name: string;
children: NavigationItemNormalized[];
/** Ancestor of the active leaf (excludes the exact active item). */
activeWithin?: boolean;
trace: string[];
meta: META;
};
/**
* Reactive, empty-safe access to another nav's published output, by
* registry id. Returns a stable entry even when `id` is not (yet)
* registered.
*/
export type NavigationResolverContext = {
/** Current path used for active matching. */
path: string | undefined;
/** Reactive, empty-safe read of another nav's published output. */
registry: (id: string) => NavigationRegistryEntry;
};
/**
* The source of a ``' items. Plain array, sync fn, or async
* fn. A fn receives a {@link NavigationResolverContext} and may read
* reactive state freely — the nav re-runs it automatically when that
* state changes.
*/
export type NavigationResolver = ((ctx: NavigationResolverContext) => NavigationItem[] | Promise[] | undefined> | undefined);
export type Options = CoreOptions;
//# sourceMappingURL=types.d.ts.map