{"version":3,"file":"ng-primitives-navigation-menu.mjs","sources":["../../../../packages/ng-primitives/navigation-menu/src/config/navigation-menu-config.ts","../../../../packages/ng-primitives/navigation-menu/src/navigation-menu/navigation-menu-state.ts","../../../../packages/ng-primitives/navigation-menu/src/navigation-menu-item/navigation-menu-item-state.ts","../../../../packages/ng-primitives/navigation-menu/src/navigation-menu-trigger/navigation-menu-trigger-state.ts","../../../../packages/ng-primitives/navigation-menu/src/navigation-menu-content/navigation-menu-content-state.ts","../../../../packages/ng-primitives/navigation-menu/src/navigation-menu-content/navigation-menu-content.ts","../../../../packages/ng-primitives/navigation-menu/src/navigation-menu-content-item/navigation-menu-content-item-state.ts","../../../../packages/ng-primitives/navigation-menu/src/navigation-menu-content-item/navigation-menu-content-item.ts","../../../../packages/ng-primitives/navigation-menu/src/navigation-menu-item/navigation-menu-item.ts","../../../../packages/ng-primitives/navigation-menu/src/navigation-menu-link/navigation-menu-link-state.ts","../../../../packages/ng-primitives/navigation-menu/src/navigation-menu-link/navigation-menu-link.ts","../../../../packages/ng-primitives/navigation-menu/src/navigation-menu-list/navigation-menu-list-state.ts","../../../../packages/ng-primitives/navigation-menu/src/navigation-menu-list/navigation-menu-list.ts","../../../../packages/ng-primitives/navigation-menu/src/navigation-menu-trigger/navigation-menu-trigger.ts","../../../../packages/ng-primitives/navigation-menu/src/navigation-menu/navigation-menu.ts","../../../../packages/ng-primitives/navigation-menu/src/ng-primitives-navigation-menu.ts"],"sourcesContent":["import { InjectionToken, Provider, inject } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { NgpFlip, NgpOffset, NgpPlacement, NgpShift } from 'ng-primitives/portal';\n\nexport interface NgpNavigationMenuConfig {\n  /**\n   * Define the orientation of the navigation menu.\n   * @default 'horizontal'\n   */\n  orientation: NgpOrientation;\n\n  /**\n   * Define the delay in milliseconds before the content is shown.\n   * @default 200\n   */\n  showDelay: number;\n\n  /**\n   * Define the delay in milliseconds before the content is hidden.\n   * @default 150\n   */\n  hideDelay: number;\n\n  /**\n   * Define the placement of the content relative to the trigger.\n   * @default 'bottom-start'\n   */\n  placement: NgpPlacement;\n\n  /**\n   * Define the offset of the content relative to the trigger.\n   * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n   * @default 4\n   */\n  offset: NgpOffset;\n\n  /**\n   * Define whether the content should flip when there is not enough space.\n   * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.\n   * @default true\n   */\n  flip: NgpFlip;\n\n  /**\n   * Configure shift behavior to keep the content in view.\n   * Can be a boolean to enable/disable, or an object with padding and limiter options.\n   * @default undefined (enabled by default in overlay)\n   */\n  shift: NgpShift;\n\n  /**\n   * Define the container element or selector in to which the content should be attached.\n   * @default 'body'\n   */\n  container: HTMLElement | string | null;\n\n  /**\n   * Whether focus should wrap around when reaching the end of the list.\n   * @default true\n   */\n  wrap: boolean;\n\n  /**\n   * Define the cooldown duration in milliseconds.\n   * When moving from one navigation menu item to another within this duration,\n   * the showDelay is skipped for the new item.\n   * @default 300\n   */\n  cooldown: number;\n}\n\nexport const defaultNavigationMenuConfig: NgpNavigationMenuConfig = {\n  orientation: 'horizontal',\n  showDelay: 200,\n  hideDelay: 150,\n  placement: 'bottom-start',\n  offset: 4,\n  flip: true,\n  shift: undefined,\n  container: 'body',\n  wrap: true,\n  cooldown: 300,\n};\n\nexport const NgpNavigationMenuConfigToken = new InjectionToken<NgpNavigationMenuConfig>(\n  'NgpNavigationMenuConfigToken',\n);\n\n/**\n * Provide the default NavigationMenu configuration\n * @param config The NavigationMenu configuration\n * @returns The provider\n */\nexport function provideNavigationMenuConfig(config: Partial<NgpNavigationMenuConfig>): Provider[] {\n  return [\n    {\n      provide: NgpNavigationMenuConfigToken,\n      useValue: { ...defaultNavigationMenuConfig, ...config },\n    },\n  ];\n}\n\n/**\n * Inject the NavigationMenu configuration\n * @returns The global NavigationMenu configuration\n */\nexport function injectNavigationMenuConfig(): NgpNavigationMenuConfig {\n  return inject(NgpNavigationMenuConfigToken, { optional: true }) ?? defaultNavigationMenuConfig;\n}\n","import { computed, signal, Signal } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { controlled, createPrimitive, dataBinding } from 'ng-primitives/state';\n\nexport interface NgpNavigationMenuState {\n  /**\n   * The orientation of the navigation menu.\n   */\n  readonly orientation: Signal<NgpOrientation>;\n\n  /**\n   * The delay in milliseconds before showing content.\n   */\n  readonly showDelay: Signal<number>;\n\n  /**\n   * The delay in milliseconds before hiding content.\n   */\n  readonly hideDelay: Signal<number>;\n\n  /**\n   * The currently active item value (open menu item).\n   */\n  readonly activeItem: Signal<string | null>;\n\n  /**\n   * Set the active item by value.\n   * @param value The item value to activate (or null to deactivate)\n   */\n  setActiveItem(value: string | null): void;\n\n  /**\n   * Set the orientation of the navigation menu.\n   * @param orientation The orientation\n   */\n  setOrientation(orientation: NgpOrientation): void;\n\n  /**\n   * Set the show delay.\n   * @param delay The delay in milliseconds\n   */\n  setShowDelay(delay: number): void;\n\n  /**\n   * Set the hide delay.\n   * @param delay The delay in milliseconds\n   */\n  setHideDelay(delay: number): void;\n}\n\nexport interface NgpNavigationMenuProps {\n  /**\n   * The orientation of the navigation menu.\n   */\n  readonly orientation?: Signal<NgpOrientation>;\n\n  /**\n   * The delay in milliseconds before showing content.\n   */\n  readonly showDelay?: Signal<number>;\n\n  /**\n   * The delay in milliseconds before hiding content.\n   */\n  readonly hideDelay?: Signal<number>;\n\n  /**\n   * The initially active item value.\n   */\n  readonly value?: Signal<string | null>;\n\n  /**\n   * Callback when the active item changes.\n   */\n  readonly onValueChange?: (value: string | null) => void;\n}\n\nexport const [\n  NgpNavigationMenuStateToken,\n  ngpNavigationMenu,\n  injectNavigationMenuState,\n  provideNavigationMenuState,\n] = createPrimitive(\n  'NgpNavigationMenu',\n  ({\n    orientation: _orientation = signal('horizontal'),\n    showDelay: _showDelay = signal(200),\n    hideDelay: _hideDelay = signal(150),\n    value: _value = signal(null),\n    onValueChange,\n  }: NgpNavigationMenuProps) => {\n    const element = injectElementRef();\n\n    // Controlled properties\n    const orientation = controlled(_orientation);\n    const showDelay = controlled(_showDelay);\n    const hideDelay = controlled(_hideDelay);\n    const activeItem = controlled(_value);\n\n    // Host bindings\n    dataBinding(element, 'data-orientation', orientation);\n\n    // Methods\n    function setActiveItem(value: string | null): void {\n      if (activeItem() === value) {\n        return;\n      }\n      activeItem.set(value);\n      onValueChange?.(value);\n    }\n\n    function setOrientation(newOrientation: NgpOrientation): void {\n      orientation.set(newOrientation);\n    }\n\n    function setShowDelay(delay: number): void {\n      showDelay.set(delay);\n    }\n\n    function setHideDelay(delay: number): void {\n      hideDelay.set(delay);\n    }\n\n    return {\n      orientation: orientation.asReadonly(),\n      showDelay: showDelay.asReadonly(),\n      hideDelay: hideDelay.asReadonly(),\n      activeItem: computed(() => activeItem()),\n      setActiveItem,\n      setOrientation,\n      setShowDelay,\n      setHideDelay,\n    } satisfies NgpNavigationMenuState;\n  },\n);\n","import { computed, signal, Signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { controlled, createPrimitive, dataBinding } from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectNavigationMenuState } from '../navigation-menu/navigation-menu-state';\n\n/**\n * The state for the NgpNavigationMenuItem directive.\n */\nexport interface NgpNavigationMenuItemState {\n  /**\n   * The unique value identifying this menu item.\n   */\n  readonly value: Signal<string>;\n\n  /**\n   * Whether this menu item is currently active (open).\n   */\n  readonly active: Signal<boolean>;\n\n  /**\n   * Show the content for this menu item.\n   */\n  show(): void;\n\n  /**\n   * Hide the content for this menu item.\n   */\n  hide(): void;\n\n  /**\n   * Set the value for this menu item.\n   * @param value The new value\n   */\n  setValue(value: string): void;\n}\n\n/**\n * The props for the NgpNavigationMenuItem state.\n */\nexport interface NgpNavigationMenuItemProps {\n  /**\n   * The unique value identifying this menu item.\n   */\n  readonly value?: Signal<string>;\n}\n\nexport const [\n  NgpNavigationMenuItemStateToken,\n  ngpNavigationMenuItem,\n  injectNavigationMenuItemState,\n  provideNavigationMenuItemState,\n] = createPrimitive(\n  'NgpNavigationMenuItem',\n  ({ value: _value = signal(uniqueId('navigation-menu-item')) }: NgpNavigationMenuItemProps) => {\n    const element = injectElementRef();\n    const navigationMenuState = injectNavigationMenuState();\n\n    // Controlled properties\n    const value = controlled(_value);\n\n    // Computed state\n    const active = computed(() => navigationMenuState().activeItem() === value());\n\n    // Host bindings\n    dataBinding(element, 'data-active', active);\n\n    // Methods\n    function show(): void {\n      navigationMenuState().setActiveItem(value());\n    }\n\n    function hide(): void {\n      if (active()) {\n        navigationMenuState().setActiveItem(null);\n      }\n    }\n\n    function setValue(newValue: string): void {\n      value.set(newValue);\n    }\n\n    return {\n      value: value.asReadonly(),\n      active,\n      show,\n      hide,\n      setValue,\n    } satisfies NgpNavigationMenuItemState;\n  },\n);\n","import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport {\n  computed,\n  inject,\n  Injector,\n  signal,\n  Signal,\n  ViewContainerRef,\n  WritableSignal,\n} from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n  createOverlay,\n  NgpFlip,\n  NgpOffset,\n  NgpOverlay,\n  NgpOverlayConfig,\n  NgpOverlayContent,\n  NgpPlacement,\n  NgpShift,\n} from 'ng-primitives/portal';\nimport {\n  attrBinding,\n  controlled,\n  createPrimitive,\n  dataBinding,\n  deprecatedSetter,\n  listener,\n  onDestroy,\n} from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectNavigationMenuItemState } from '../navigation-menu-item/navigation-menu-item-state';\nimport { injectNavigationMenuState } from '../navigation-menu/navigation-menu-state';\n\nexport interface NgpNavigationMenuTriggerState {\n  /**\n   * The content template or component.\n   */\n  readonly content: Signal<NgpOverlayContent<unknown> | undefined>;\n\n  /**\n   * Whether the trigger is disabled.\n   */\n  readonly disabled: Signal<boolean>;\n\n  /**\n   * The placement of the content.\n   */\n  readonly placement: Signal<NgpPlacement>;\n\n  /**\n   * The offset of the content.\n   */\n  readonly offset: Signal<NgpOffset>;\n\n  /**\n   * Whether the content should flip when there is not enough space.\n   */\n  readonly flip: Signal<NgpFlip>;\n\n  /**\n   * The shift configuration for the content.\n   */\n  readonly shift: Signal<NgpShift>;\n\n  /**\n   * The container for the content.\n   */\n  readonly container: WritableSignal<HTMLElement | string | null>;\n\n  /**\n   * Whether the content is currently open.\n   */\n  readonly open: Signal<boolean>;\n\n  /**\n   * The unique ID for accessibility.\n   */\n  readonly id: string;\n\n  /**\n   * The ID of the associated content panel.\n   */\n  readonly contentId: Signal<string | undefined>;\n\n  /**\n   * Show the content.\n   */\n  show(): void;\n\n  /**\n   * Hide the content.\n   * @param origin The focus origin\n   */\n  hide(origin?: FocusOrigin): void;\n\n  /**\n   * Focus the first item in the content.\n   */\n  focusFirstContentItem(): void;\n\n  /**\n   * Focus the last item in the content.\n   */\n  focusLastContentItem(): void;\n\n  /**\n   * Set the content ID.\n   * @param id The content ID\n   */\n  setContentId(id: string): void;\n\n  /**\n   * Set the container in which the content should be attached. Takes effect the\n   * next time the content is opened; it does not move content that is already\n   * open.\n   * @param container The new container\n   */\n  setContainer(container: HTMLElement | string | null): void;\n\n  /**\n   * Update pointer over content state.\n   * @param isOver Whether pointer is over content\n   */\n  setPointerOverContent(isOver: boolean): void;\n\n  /**\n   * Update focus inside content state.\n   * @param isFocused Whether focus is inside the content\n   */\n  setFocusInsideContent(isFocused: boolean): void;\n\n  /**\n   * Register focus functions from content.\n   * @param focusFirst Function to focus first item\n   * @param focusLast Function to focus last item\n   */\n  registerContentFocusFunctions(focusFirst: () => void, focusLast: () => void): void;\n}\n\nexport interface NgpNavigationMenuTriggerProps {\n  /**\n   * The content template or component.\n   */\n  readonly content?: Signal<NgpOverlayContent<unknown> | undefined>;\n\n  /**\n   * Whether the trigger is disabled.\n   */\n  readonly disabled?: Signal<boolean>;\n\n  /**\n   * The placement of the content.\n   */\n  readonly placement?: Signal<NgpPlacement>;\n\n  /**\n   * The offset of the content.\n   */\n  readonly offset?: Signal<NgpOffset>;\n\n  /**\n   * Whether the content should flip.\n   */\n  readonly flip?: Signal<NgpFlip>;\n\n  /**\n   * The shift configuration.\n   */\n  readonly shift?: Signal<NgpShift>;\n\n  /**\n   * The container for the content.\n   */\n  readonly container?: Signal<HTMLElement | string | null>;\n\n  /**\n   * The cooldown duration in milliseconds.\n   */\n  readonly cooldown?: Signal<number>;\n}\n\nexport const [\n  NgpNavigationMenuTriggerStateToken,\n  ngpNavigationMenuTrigger,\n  injectNavigationMenuTriggerState,\n  provideNavigationMenuTriggerState,\n] = createPrimitive(\n  'NgpNavigationMenuTrigger',\n  ({\n    content: _content = signal(undefined),\n    disabled: _disabled = signal(false),\n    placement: _placement = signal('bottom-start'),\n    offset: _offset = signal(4),\n    flip: _flip = signal(true),\n    shift: _shift = signal(undefined),\n    container: _container = signal('body'),\n    cooldown: _cooldown = signal(300),\n  }: NgpNavigationMenuTriggerProps) => {\n    const element = injectElementRef();\n    const injector = inject(Injector);\n    const viewContainerRef = inject(ViewContainerRef);\n    const focusMonitor = inject(FocusMonitor);\n    const directionality = inject(Directionality);\n    const navigationMenuState = injectNavigationMenuState();\n    const navigationMenuItemState = injectNavigationMenuItemState();\n\n    // Controlled properties - use asReadonly() for public interface\n    const content = controlled(_content);\n    const disabled = controlled(_disabled);\n    const placement = controlled(_placement);\n    const offset = controlled(_offset);\n    const flip = controlled(_flip);\n    const shift = controlled(_shift);\n    const container = controlled(_container);\n    const cooldown = controlled(_cooldown);\n\n    // Internal state\n    const id = uniqueId('navigation-menu-trigger');\n    const contentId = signal<string | undefined>(undefined);\n    const overlay = signal<NgpOverlay<unknown> | null>(null);\n    const open = computed(() => navigationMenuItemState().active());\n    let showTimeout: ReturnType<typeof setTimeout> | null = null;\n    let hideTimeout: ReturnType<typeof setTimeout> | null = null;\n    let isPointerOverTrigger = false;\n    let isPointerOverContent = false;\n    let isFocusInsideContent = false;\n    let contentFocusFirstFn: (() => void) | null = null;\n    let contentFocusLastFn: (() => void) | null = null;\n    let wasOpen = false;\n\n    // Host bindings\n    attrBinding(element, 'id', id);\n    attrBinding(element, 'aria-haspopup', 'menu');\n    attrBinding(element, 'aria-expanded', open);\n    attrBinding(element, 'aria-controls', () => contentId() ?? null);\n    dataBinding(element, 'data-open', open);\n    dataBinding(element, 'data-disabled', disabled);\n\n    // Event listeners\n    listener(element, 'pointerenter', onPointerEnter);\n    listener(element, 'pointerleave', onPointerLeave);\n    listener(element, 'focus', onFocus);\n    listener(element, 'blur', onBlur);\n    listener(element, 'click', onClick);\n    listener(element, 'keydown', onKeydown);\n\n    // Cleanup on destroy\n    onDestroy(() => {\n      clearShowTimeout();\n      clearHideTimeout();\n      overlay()?.destroy();\n      contentFocusFirstFn = null;\n      contentFocusLastFn = null;\n    });\n\n    // Methods\n    function onPointerEnter(event: PointerEvent): void {\n      if (disabled() || event.pointerType === 'touch') {\n        return;\n      }\n      isPointerOverTrigger = true;\n      clearHideTimeout();\n      scheduleShow();\n    }\n\n    function onPointerLeave(event: PointerEvent): void {\n      if (disabled() || event.pointerType === 'touch') {\n        return;\n      }\n      isPointerOverTrigger = false;\n      clearShowTimeout();\n      scheduleHide();\n    }\n\n    function onFocus(): void {\n      if (disabled()) {\n        return;\n      }\n      // Only clear hide timeout on focus, don't show\n      // Menu should open on hover or enter key, not on focus alone\n      clearHideTimeout();\n    }\n\n    function onBlur(): void {\n      if (disabled()) {\n        return;\n      }\n      // Don't hide if focus is moving to the content\n      scheduleHide();\n    }\n\n    function onClick(): void {\n      if (disabled()) {\n        return;\n      }\n      // For touch/click, toggle immediately\n      if (open()) {\n        hide('mouse');\n      } else {\n        show();\n      }\n    }\n\n    function onKeydown(event: KeyboardEvent): void {\n      if (disabled()) {\n        return;\n      }\n\n      const orientation = navigationMenuState().orientation();\n      const isRtl = directionality.value === 'rtl';\n\n      // Determine which arrow key opens content based on orientation\n      const openKey =\n        orientation === 'horizontal' ? 'ArrowDown' : isRtl ? 'ArrowLeft' : 'ArrowRight';\n      const openLastKey =\n        orientation === 'horizontal' ? 'ArrowUp' : isRtl ? 'ArrowRight' : 'ArrowLeft';\n\n      if (event.key === openKey) {\n        event.preventDefault();\n        if (!open()) {\n          // Wait for overlay to show, then focus first item (has built-in retry)\n          show().then(() => focusFirstContentItem());\n        } else {\n          // Already open, just focus first item\n          focusFirstContentItem();\n        }\n      } else if (event.key === openLastKey && open()) {\n        event.preventDefault();\n        // Focus last item in content\n        focusLastContentItem();\n      } else if (event.key === 'Enter' || event.key === ' ') {\n        event.preventDefault();\n        if (open()) {\n          focusFirstContentItem();\n        } else {\n          // Wait for overlay to show, then focus first item (has built-in retry)\n          show().then(() => focusFirstContentItem());\n        }\n      } else if (event.key === 'Escape' && open()) {\n        event.preventDefault();\n        hide('keyboard');\n      }\n    }\n\n    function scheduleShow(): void {\n      clearShowTimeout();\n      const delay = navigationMenuState().showDelay();\n\n      if (delay === 0) {\n        show();\n        return;\n      }\n\n      showTimeout = setTimeout(() => {\n        show();\n      }, delay);\n    }\n\n    function scheduleHide(): void {\n      clearHideTimeout();\n      const delay = navigationMenuState().hideDelay();\n\n      if (delay === 0) {\n        hide();\n        return;\n      }\n\n      hideTimeout = setTimeout(() => {\n        // Only hide if pointer is not over trigger or content and focus is not inside content\n        if (!isPointerOverTrigger && !isPointerOverContent && !isFocusInsideContent) {\n          hide();\n        }\n      }, delay);\n    }\n\n    function clearShowTimeout(): void {\n      if (showTimeout) {\n        clearTimeout(showTimeout);\n        showTimeout = null;\n      }\n    }\n\n    function clearHideTimeout(): void {\n      if (hideTimeout) {\n        clearTimeout(hideTimeout);\n        hideTimeout = null;\n      }\n    }\n\n    function show(): Promise<void> {\n      if (disabled()) {\n        return Promise.resolve();\n      }\n      navigationMenuItemState().show();\n\n      // Imperatively manage overlay - show it now\n      return syncOverlayState(true);\n    }\n\n    function hide(origin: FocusOrigin = 'program'): void {\n      navigationMenuItemState().hide();\n\n      // Imperatively manage overlay - hide it now\n      syncOverlayState(false);\n\n      // If closing via keyboard, restore focus to trigger\n      if (origin === 'keyboard') {\n        focusMonitor.focusVia(element, 'keyboard');\n      }\n    }\n\n    function syncOverlayState(shouldBeOpen: boolean): Promise<void> {\n      if (shouldBeOpen && !wasOpen) {\n        wasOpen = true;\n        return showOverlay();\n      } else if (!shouldBeOpen && wasOpen) {\n        hideOverlay();\n        wasOpen = false;\n      }\n      return Promise.resolve();\n    }\n\n    function showOverlay(): Promise<void> {\n      if (!content()) {\n        return Promise.resolve();\n      }\n\n      // Create overlay if needed\n      if (!overlay()) {\n        createOverlayInstance();\n      }\n\n      return overlay()?.show() ?? Promise.resolve();\n    }\n\n    function hideOverlay(): void {\n      overlay()?.hide();\n    }\n\n    function createOverlayInstance(): void {\n      const contentValue = content();\n\n      if (!contentValue) {\n        return;\n      }\n\n      const config: NgpOverlayConfig<unknown> = {\n        content: content,\n        triggerElement: element.nativeElement,\n        injector,\n        viewContainerRef,\n        container,\n        placement,\n        offset: offset(),\n        flip: flip(),\n        shift: shift(),\n        closeOnOutsideClick: true,\n        closeOnEscape: true,\n        restoreFocus: false, // We handle focus restoration ourselves\n        overlayType: 'navigation-menu',\n        cooldown: cooldown(),\n      };\n\n      overlay.set(createOverlay(config));\n    }\n\n    function focusFirstContentItem(retryCount = 0): void {\n      if (contentFocusFirstFn) {\n        contentFocusFirstFn();\n      } else if (retryCount < 3) {\n        // Focus function not registered yet, retry after a frame\n        requestAnimationFrame(() => focusFirstContentItem(retryCount + 1));\n      }\n    }\n\n    function focusLastContentItem(retryCount = 0): void {\n      if (contentFocusLastFn) {\n        contentFocusLastFn();\n      } else if (retryCount < 3) {\n        // Focus function not registered yet, retry after a frame\n        requestAnimationFrame(() => focusLastContentItem(retryCount + 1));\n      }\n    }\n\n    function setContentId(newId: string): void {\n      contentId.set(newId);\n    }\n\n    function setContainer(newContainer: HTMLElement | string | null): void {\n      container.set(newContainer);\n    }\n\n    function setPointerOverContent(isOver: boolean): void {\n      isPointerOverContent = isOver;\n      if (isOver) {\n        clearHideTimeout();\n      } else {\n        scheduleHide();\n      }\n    }\n\n    function setFocusInsideContent(isFocused: boolean): void {\n      isFocusInsideContent = isFocused;\n      if (isFocused) {\n        clearHideTimeout();\n      } else {\n        scheduleHide();\n      }\n    }\n\n    function registerContentFocusFunctions(focusFirst: () => void, focusLast: () => void): void {\n      contentFocusFirstFn = focusFirst;\n      contentFocusLastFn = focusLast;\n    }\n\n    return {\n      content: content.asReadonly(),\n      disabled: disabled.asReadonly(),\n      placement: placement.asReadonly(),\n      offset: offset.asReadonly(),\n      flip: flip.asReadonly(),\n      shift: shift.asReadonly(),\n      container: deprecatedSetter(container, 'setContainer', setContainer),\n      open,\n      id,\n      contentId: computed(() => contentId()),\n      show,\n      hide,\n      focusFirstContentItem,\n      focusLastContentItem,\n      setContentId,\n      setContainer,\n      setPointerOverContent,\n      setFocusInsideContent,\n      registerContentFocusFunctions,\n    } satisfies NgpNavigationMenuTriggerState;\n  },\n);\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { computed, inject, signal, Signal } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { NgpOverlay } from 'ng-primitives/portal';\nimport { injectRovingFocusGroupState } from 'ng-primitives/roving-focus';\nimport {\n  attrBinding,\n  controlled,\n  createPrimitive,\n  dataBinding,\n  listener,\n  onDestroy,\n  onMount,\n  styleBinding,\n} from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectNavigationMenuItemState } from '../navigation-menu-item/navigation-menu-item-state';\nimport { injectNavigationMenuTriggerState } from '../navigation-menu-trigger/navigation-menu-trigger-state';\nimport { injectNavigationMenuState } from '../navigation-menu/navigation-menu-state';\n\n/**\n * The state for the NgpNavigationMenuContent directive.\n */\nexport interface NgpNavigationMenuContentState {\n  /**\n   * The unique ID for this content panel.\n   */\n  readonly id: string;\n\n  /**\n   * Whether the content is currently open.\n   */\n  readonly open: Signal<boolean>;\n\n  /**\n   * The orientation for keyboard navigation within the content.\n   */\n  readonly orientation: Signal<NgpOrientation>;\n\n  /**\n   * Close the content.\n   * @param origin The focus origin\n   */\n  close(origin?: FocusOrigin): void;\n\n  /**\n   * Focus the first focusable item in the content.\n   */\n  focusFirst(): void;\n\n  /**\n   * Focus the last focusable item in the content.\n   */\n  focusLast(): void;\n\n  /**\n   * Set the orientation for keyboard navigation within the content.\n   * @param orientation The orientation ('vertical' for lists, 'horizontal' for grids)\n   */\n  setOrientation(orientation: NgpOrientation): void;\n}\n\n/**\n * The props for the NgpNavigationMenuContent state.\n */\nexport interface NgpNavigationMenuContentProps {\n  /**\n   * The orientation for keyboard navigation within the content.\n   * Use 'horizontal' for grid layouts, 'vertical' for lists.\n   */\n  readonly orientation?: Signal<NgpOrientation>;\n}\n\nexport const [\n  NgpNavigationMenuContentStateToken,\n  ngpNavigationMenuContent,\n  injectNavigationMenuContentState,\n  provideNavigationMenuContentState,\n] = createPrimitive(\n  'NgpNavigationMenuContent',\n  ({ orientation: _orientation = signal('vertical') }: NgpNavigationMenuContentProps) => {\n    const element = injectElementRef();\n    const directionality = inject(Directionality);\n    const navigationMenuState = injectNavigationMenuState({ hoisted: true });\n    const navigationMenuItemState = injectNavigationMenuItemState({ hoisted: true });\n    const triggerState = injectNavigationMenuTriggerState({ hoisted: true });\n    const rovingFocusGroup = injectRovingFocusGroupState();\n\n    // Controlled properties\n    const orientation = controlled(_orientation);\n\n    // Try to get overlay - may not exist if content isn't in a portal\n    const overlay = inject(NgpOverlay, { optional: true });\n    overlay?.registerAvailableSizePrefix('--ngp-navigation-menu');\n\n    const id = uniqueId('navigation-menu-content');\n    const open = computed(() => navigationMenuItemState?.()?.active() ?? false);\n    let isPointerOver = false;\n    let isFocusInside = false;\n\n    // Host bindings\n    attrBinding(element, 'id', id);\n    attrBinding(element, 'role', 'menu');\n    attrBinding(element, 'aria-labelledby', () => triggerState?.()?.id ?? null);\n    dataBinding(element, 'data-open', open);\n    dataBinding(element, 'data-placement', () => overlay?.finalPlacement() ?? null);\n    dataBinding(element, 'data-orientation', orientation);\n    dataBinding(element, 'data-instant', () => overlay?.instantTransition() ?? false);\n\n    // Style bindings for positioning\n    styleBinding(element, 'left.px', () => overlay?.position().x ?? null);\n    styleBinding(element, 'top.px', () => overlay?.position().y ?? null);\n    styleBinding(\n      element,\n      '--ngp-navigation-menu-trigger-width.px',\n      () => overlay?.triggerWidth() ?? null,\n    );\n    styleBinding(\n      element,\n      '--ngp-navigation-menu-transform-origin',\n      () => overlay?.transformOrigin() ?? null,\n    );\n    styleBinding(\n      element,\n      '--ngp-navigation-menu-available-width.px',\n      () => overlay?.availableWidth() ?? null,\n    );\n    styleBinding(\n      element,\n      '--ngp-navigation-menu-available-height.px',\n      () => overlay?.availableHeight() ?? null,\n    );\n\n    // Event listeners\n    listener(element, 'pointerenter', onPointerEnter);\n    listener(element, 'pointerleave', onPointerLeave);\n    listener(element, 'focusin', onFocusIn);\n    listener(element, 'focusout', onFocusOut);\n    listener(element, 'keydown', onKeydown);\n\n    // Register content ID with trigger on mount\n    onMount(() => {\n      triggerState?.()?.setContentId(id);\n\n      // Register focus functions with trigger\n      triggerState?.()?.registerContentFocusFunctions(focusFirst, focusLast);\n    });\n\n    // Cleanup on destroy\n    onDestroy(() => {\n      // Notify trigger that pointer left content\n      if (isPointerOver) {\n        triggerState?.()?.setPointerOverContent(false);\n      }\n      // Notify trigger that focus left content\n      if (isFocusInside) {\n        triggerState?.()?.setFocusInsideContent(false);\n      }\n    });\n\n    function onPointerEnter(event: PointerEvent): void {\n      if (event.pointerType === 'touch') {\n        return;\n      }\n      isPointerOver = true;\n      triggerState?.()?.setPointerOverContent(true);\n    }\n\n    function onPointerLeave(event: PointerEvent): void {\n      if (event.pointerType === 'touch') {\n        return;\n      }\n      isPointerOver = false;\n      triggerState?.()?.setPointerOverContent(false);\n    }\n\n    function onFocusIn(): void {\n      isFocusInside = true;\n      triggerState?.()?.setFocusInsideContent(true);\n    }\n\n    function onFocusOut(event: FocusEvent): void {\n      // Check if focus is moving outside the content\n      const relatedTarget = event.relatedTarget as HTMLElement | null;\n      const contentElement = element.nativeElement;\n\n      // If focus is moving to another element inside the content, don't mark as lost\n      if (relatedTarget && contentElement.contains(relatedTarget)) {\n        return;\n      }\n\n      isFocusInside = false;\n      triggerState?.()?.setFocusInsideContent(false);\n    }\n\n    function onKeydown(event: KeyboardEvent): void {\n      const menuOrientation = navigationMenuState?.()?.orientation() ?? 'horizontal';\n      const isRtl = directionality.value === 'rtl';\n\n      // Determine which arrow key closes content and returns to trigger\n      // For horizontal menu: ArrowUp closes\n      // For vertical menu: ArrowLeft closes (or ArrowRight in RTL)\n      const closeKey =\n        menuOrientation === 'horizontal' ? 'ArrowUp' : isRtl ? 'ArrowRight' : 'ArrowLeft';\n\n      if (event.key === 'Escape') {\n        event.preventDefault();\n        close('keyboard');\n      } else if (event.key === closeKey) {\n        // Only close if we're at the edge of the content\n        // For now, we let the roving focus handle internal navigation\n        // and only close on Escape\n      }\n    }\n\n    function close(origin: FocusOrigin = 'program'): void {\n      navigationMenuItemState?.()?.hide();\n\n      // Restore focus to trigger on keyboard close\n      if (origin === 'keyboard') {\n        triggerState?.()?.hide('keyboard');\n      }\n    }\n\n    function focusFirst(): void {\n      // Use the roving focus group's activateFirst method\n      rovingFocusGroup()?.activateFirst('keyboard');\n    }\n\n    function focusLast(): void {\n      // Use the roving focus group's activateLast method\n      rovingFocusGroup()?.activateLast('keyboard');\n    }\n\n    function setOrientation(value: NgpOrientation): void {\n      orientation.set(value);\n      // Also update the roving focus group orientation\n      rovingFocusGroup()?.setOrientation(value);\n    }\n\n    return {\n      id,\n      open,\n      orientation: orientation.asReadonly(),\n      close,\n      focusFirst,\n      focusLast,\n      setOrientation,\n    } satisfies NgpNavigationMenuContentState;\n  },\n);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { provideControlContainerIsolation } from 'ng-primitives/portal';\nimport { ngpRovingFocusGroup, provideRovingFocusGroupState } from 'ng-primitives/roving-focus';\nimport { injectNavigationMenuConfig } from '../config/navigation-menu-config';\nimport {\n  ngpNavigationMenuContent,\n  provideNavigationMenuContentState,\n} from './navigation-menu-content-state';\n\n/**\n * The `NgpNavigationMenuContent` directive is the content panel displayed when a trigger is activated.\n * It has its own roving focus group for keyboard navigation within the content.\n */\n@Directive({\n  selector: '[ngpNavigationMenuContent]',\n  exportAs: 'ngpNavigationMenuContent',\n  providers: [\n    provideNavigationMenuContentState(),\n    provideRovingFocusGroupState({ inherit: false }),\n    provideControlContainerIsolation(),\n  ],\n  host: {\n    'data-overlay': '',\n  },\n})\nexport class NgpNavigationMenuContent {\n  /**\n   * Access the global navigation menu configuration.\n   */\n  private readonly config = injectNavigationMenuConfig();\n\n  /**\n   * The orientation for keyboard navigation within the content.\n   * Use 'vertical' for list layouts (default), 'horizontal' for grid layouts.\n   * @default 'vertical'\n   */\n  readonly orientation = input<NgpOrientation>('vertical', {\n    alias: 'ngpNavigationMenuContentOrientation',\n  });\n\n  /**\n   * Whether focus should wrap around when reaching the end of the content.\n   * @default true\n   */\n  readonly wrap = input<boolean, BooleanInput>(this.config.wrap, {\n    alias: 'ngpNavigationMenuContentWrap',\n    transform: booleanAttribute,\n  });\n\n  private readonly state = ngpNavigationMenuContent({\n    orientation: this.orientation,\n  });\n\n  constructor() {\n    // Create roving focus group for content items\n    ngpRovingFocusGroup({\n      orientation: this.orientation,\n      wrap: this.wrap,\n      inherit: false,\n    });\n  }\n\n  /**\n   * Close the content panel.\n   */\n  close(): void {\n    this.state.close();\n  }\n\n  /**\n   * Focus the first focusable item in the content.\n   */\n  focusFirst(): void {\n    this.state.focusFirst();\n  }\n\n  /**\n   * Focus the last focusable item in the content.\n   */\n  focusLast(): void {\n    this.state.focusLast();\n  }\n}\n","import { signal, Signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, controlled, createPrimitive, dataBinding } from 'ng-primitives/state';\n\n/**\n * The state for the NgpNavigationMenuContentItem directive.\n */\nexport interface NgpNavigationMenuContentItemState {\n  /**\n   * Whether the item is disabled.\n   */\n  readonly disabled: Signal<boolean>;\n\n  /**\n   * Set whether the item is disabled.\n   * @param isDisabled Whether the item is disabled\n   */\n  setDisabled(isDisabled: boolean): void;\n}\n\n/**\n * The props for the NgpNavigationMenuContentItem state.\n */\nexport interface NgpNavigationMenuContentItemProps {\n  /**\n   * Whether the item is disabled.\n   */\n  readonly disabled?: Signal<boolean>;\n}\n\nexport const [\n  NgpNavigationMenuContentItemStateToken,\n  ngpNavigationMenuContentItem,\n  injectNavigationMenuContentItemState,\n  provideNavigationMenuContentItemState,\n] = createPrimitive(\n  'NgpNavigationMenuContentItem',\n  ({ disabled: _disabled = signal(false) }: NgpNavigationMenuContentItemProps) => {\n    const element = injectElementRef();\n\n    // Controlled properties\n    const disabled = controlled(_disabled);\n\n    // Host bindings\n    attrBinding(element, 'role', 'menuitem');\n    dataBinding(element, 'data-disabled', disabled);\n\n    function setDisabled(isDisabled: boolean): void {\n      disabled.set(isDisabled);\n    }\n\n    return {\n      disabled: disabled.asReadonly(),\n      setDisabled,\n    } satisfies NgpNavigationMenuContentItemState;\n  },\n);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input } from '@angular/core';\nimport { ngpRovingFocusItem, provideRovingFocusItemState } from 'ng-primitives/roving-focus';\nimport {\n  ngpNavigationMenuContentItem,\n  provideNavigationMenuContentItemState,\n} from './navigation-menu-content-item-state';\n\n/**\n * The `NgpNavigationMenuContentItem` directive represents an item inside navigation menu content.\n * It participates in roving focus navigation within the content panel.\n */\n@Directive({\n  selector: '[ngpNavigationMenuContentItem]',\n  exportAs: 'ngpNavigationMenuContentItem',\n  providers: [provideNavigationMenuContentItemState(), provideRovingFocusItemState()],\n})\nexport class NgpNavigationMenuContentItem {\n  /**\n   * Whether the item is disabled.\n   * @default false\n   */\n  readonly disabled = input<boolean, BooleanInput>(false, {\n    alias: 'ngpNavigationMenuContentItemDisabled',\n    transform: booleanAttribute,\n  });\n\n  constructor() {\n    ngpNavigationMenuContentItem({ disabled: this.disabled });\n    ngpRovingFocusItem({ disabled: this.disabled });\n  }\n}\n","import { Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport {\n  ngpNavigationMenuItem,\n  provideNavigationMenuItemState,\n} from './navigation-menu-item-state';\n\n/**\n * The `NgpNavigationMenuItem` directive is a container for a menu trigger and its content.\n * It manages the open/close state for this specific menu item.\n */\n@Directive({\n  selector: '[ngpNavigationMenuItem]',\n  exportAs: 'ngpNavigationMenuItem',\n  providers: [provideNavigationMenuItemState({ inherit: false })],\n})\nexport class NgpNavigationMenuItem {\n  /**\n   * A unique value identifying this menu item.\n   * Used to track which item is currently active.\n   */\n  readonly value = input<string>(uniqueId('navigation-menu-item'), {\n    alias: 'ngpNavigationMenuItemValue',\n  });\n\n  private readonly state = ngpNavigationMenuItem({\n    value: this.value,\n  });\n\n  /**\n   * Whether this menu item is currently active (open).\n   */\n  readonly active = this.state.active;\n\n  /**\n   * Show the content for this menu item.\n   */\n  show(): void {\n    this.state.show();\n  }\n\n  /**\n   * Hide the content for this menu item.\n   */\n  hide(): void {\n    this.state.hide();\n  }\n}\n","import { signal, Signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n  attrBinding,\n  controlled,\n  createPrimitive,\n  dataBinding,\n  listener,\n} from 'ng-primitives/state';\n\n/**\n * The state for the NgpNavigationMenuLink directive.\n */\nexport interface NgpNavigationMenuLinkState {\n  /**\n   * Whether the link is disabled.\n   */\n  readonly disabled: Signal<boolean>;\n\n  /**\n   * Whether the link is active (current page).\n   */\n  readonly active: Signal<boolean>;\n\n  /**\n   * Set whether the link is disabled.\n   * @param isDisabled Whether the link is disabled\n   */\n  setDisabled(isDisabled: boolean): void;\n\n  /**\n   * Set whether the link is active.\n   * @param isActive Whether the link is active\n   */\n  setActive(isActive: boolean): void;\n}\n\n/**\n * The props for the NgpNavigationMenuLink state.\n */\nexport interface NgpNavigationMenuLinkProps {\n  /**\n   * Whether the link is disabled.\n   */\n  readonly disabled?: Signal<boolean>;\n\n  /**\n   * Whether the link is active (current page).\n   */\n  readonly active?: Signal<boolean>;\n}\n\nexport const [\n  NgpNavigationMenuLinkStateToken,\n  ngpNavigationMenuLink,\n  injectNavigationMenuLinkState,\n  provideNavigationMenuLinkState,\n] = createPrimitive(\n  'NgpNavigationMenuLink',\n  ({\n    disabled: _disabled = signal(false),\n    active: _active = signal(false),\n  }: NgpNavigationMenuLinkProps) => {\n    const element = injectElementRef();\n\n    // Controlled properties\n    const disabled = controlled(_disabled);\n    const active = controlled(_active);\n\n    // Host bindings\n    attrBinding(element, 'aria-current', () => (active() ? 'page' : null));\n    attrBinding(element, 'aria-disabled', () => (disabled() ? 'true' : null));\n    dataBinding(element, 'data-active', active);\n    dataBinding(element, 'data-disabled', disabled);\n\n    // Prevent click when disabled\n    listener(element, 'click', (event: MouseEvent) => {\n      if (disabled()) {\n        event.preventDefault();\n        event.stopPropagation();\n      }\n    });\n\n    function setDisabled(isDisabled: boolean): void {\n      disabled.set(isDisabled);\n    }\n\n    function setActive(isActive: boolean): void {\n      active.set(isActive);\n    }\n\n    return {\n      disabled: disabled.asReadonly(),\n      active: active.asReadonly(),\n      setDisabled,\n      setActive,\n    } satisfies NgpNavigationMenuLinkState;\n  },\n);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input } from '@angular/core';\nimport { ngpRovingFocusItem, provideRovingFocusItemState } from 'ng-primitives/roving-focus';\nimport {\n  ngpNavigationMenuLink,\n  provideNavigationMenuLinkState,\n} from './navigation-menu-link-state';\n\n/**\n * The `NgpNavigationMenuLink` directive is used for standalone navigation links\n * within the navigation menu list (links without dropdown content).\n */\n@Directive({\n  selector: '[ngpNavigationMenuLink]',\n  exportAs: 'ngpNavigationMenuLink',\n  providers: [provideNavigationMenuLinkState(), provideRovingFocusItemState()],\n})\nexport class NgpNavigationMenuLink {\n  /**\n   * Whether the link is disabled.\n   * @default false\n   */\n  readonly disabled = input<boolean, BooleanInput>(false, {\n    alias: 'ngpNavigationMenuLinkDisabled',\n    transform: booleanAttribute,\n  });\n\n  /**\n   * Whether the link is active (represents the current page).\n   * @default false\n   */\n  readonly active = input<boolean, BooleanInput>(false, {\n    alias: 'ngpNavigationMenuLinkActive',\n    transform: booleanAttribute,\n  });\n\n  private readonly state = ngpNavigationMenuLink({\n    disabled: this.disabled,\n    active: this.active,\n  });\n\n  constructor() {\n    ngpRovingFocusItem({\n      disabled: this.disabled,\n    });\n  }\n}\n","import { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, createPrimitive, dataBinding } from 'ng-primitives/state';\nimport { injectNavigationMenuState } from '../navigation-menu/navigation-menu-state';\n\n/**\n * The state for the NgpNavigationMenuList directive.\n */\nexport interface NgpNavigationMenuListState {\n  // No public methods exposed for navigation menu list\n}\n\n/**\n * The props for the NgpNavigationMenuList state.\n */\nexport interface NgpNavigationMenuListProps {\n  // No props for navigation menu list\n}\n\nexport const [\n  NgpNavigationMenuListStateToken,\n  ngpNavigationMenuList,\n  injectNavigationMenuListState,\n  provideNavigationMenuListState,\n] = createPrimitive('NgpNavigationMenuList', ({}: NgpNavigationMenuListProps) => {\n  const element = injectElementRef();\n  const navigationMenuState = injectNavigationMenuState();\n\n  // Host bindings\n  attrBinding(element, 'role', 'menubar');\n  attrBinding(element, 'aria-orientation', () => navigationMenuState().orientation());\n  dataBinding(element, 'data-orientation', () => navigationMenuState().orientation());\n\n  return {} satisfies NgpNavigationMenuListState;\n});\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input } from '@angular/core';\nimport { ngpRovingFocusGroup, provideRovingFocusGroupState } from 'ng-primitives/roving-focus';\nimport { injectNavigationMenuConfig } from '../config/navigation-menu-config';\nimport { injectNavigationMenuState } from '../navigation-menu/navigation-menu-state';\nimport {\n  ngpNavigationMenuList,\n  provideNavigationMenuListState,\n} from './navigation-menu-list-state';\n\n/**\n * The `NgpNavigationMenuList` directive is a container for navigation menu items.\n * It manages roving focus between menu triggers and links.\n */\n@Directive({\n  selector: '[ngpNavigationMenuList]',\n  exportAs: 'ngpNavigationMenuList',\n  providers: [provideNavigationMenuListState(), provideRovingFocusGroupState({ inherit: false })],\n})\nexport class NgpNavigationMenuList {\n  /**\n   * Access the global navigation menu configuration.\n   */\n  private readonly config = injectNavigationMenuConfig();\n\n  /**\n   * Access the parent navigation menu state.\n   */\n  private readonly navigationMenuState = injectNavigationMenuState();\n\n  /**\n   * Whether focus should wrap around when reaching the end of the list.\n   * @default true\n   */\n  readonly wrap = input<boolean, BooleanInput>(this.config.wrap, {\n    alias: 'ngpNavigationMenuListWrap',\n    transform: booleanAttribute,\n  });\n\n  constructor() {\n    ngpNavigationMenuList({});\n    ngpRovingFocusGroup({\n      orientation: this.navigationMenuState().orientation,\n      wrap: this.wrap,\n    });\n  }\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, numberAttribute } from '@angular/core';\nimport {\n  coerceFlip,\n  coerceOffset,\n  coerceShift,\n  NgpFlip,\n  NgpFlipInput,\n  NgpOffset,\n  NgpOffsetInput,\n  NgpOverlayContent,\n  NgpPlacement,\n  NgpShift,\n  NgpShiftInput,\n} from 'ng-primitives/portal';\nimport { ngpRovingFocusItem, provideRovingFocusItemState } from 'ng-primitives/roving-focus';\nimport { injectNavigationMenuConfig } from '../config/navigation-menu-config';\nimport {\n  ngpNavigationMenuTrigger,\n  provideNavigationMenuTriggerState,\n} from './navigation-menu-trigger-state';\n\n/**\n * The `NgpNavigationMenuTrigger` directive is a button that opens navigation menu content.\n * It supports hover and focus interactions with configurable delays.\n */\n@Directive({\n  selector: '[ngpNavigationMenuTrigger]',\n  exportAs: 'ngpNavigationMenuTrigger',\n  providers: [provideNavigationMenuTriggerState(), provideRovingFocusItemState()],\n  host: {\n    type: 'button',\n  },\n})\nexport class NgpNavigationMenuTrigger {\n  /**\n   * Access the global navigation menu configuration.\n   */\n  private readonly config = injectNavigationMenuConfig();\n\n  /**\n   * The content template or component to display.\n   */\n  readonly content = input<NgpOverlayContent<unknown>>(undefined, {\n    alias: 'ngpNavigationMenuTrigger',\n  });\n\n  /**\n   * Whether the trigger is disabled.\n   * @default false\n   */\n  readonly disabled = input<boolean, BooleanInput>(false, {\n    alias: 'ngpNavigationMenuTriggerDisabled',\n    transform: booleanAttribute,\n  });\n\n  /**\n   * The placement of the content relative to the trigger.\n   * @default 'bottom-start'\n   */\n  readonly placement = input<NgpPlacement>(this.config.placement, {\n    alias: 'ngpNavigationMenuTriggerPlacement',\n  });\n\n  /**\n   * The offset of the content relative to the trigger.\n   * @default 4\n   */\n  readonly offset = input<NgpOffset, NgpOffsetInput>(this.config.offset, {\n    alias: 'ngpNavigationMenuTriggerOffset',\n    transform: coerceOffset,\n  });\n\n  /**\n   * Whether the content should flip when there is not enough space.\n   * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.\n   * @default true\n   */\n  readonly flip = input<NgpFlip, NgpFlipInput>(this.config.flip, {\n    alias: 'ngpNavigationMenuTriggerFlip',\n    transform: coerceFlip,\n  });\n\n  /**\n   * Configure shift behavior to keep the content in view.\n   * @default undefined\n   */\n  readonly shift = input<NgpShift, NgpShiftInput>(this.config.shift, {\n    alias: 'ngpNavigationMenuTriggerShift',\n    transform: coerceShift,\n  });\n\n  /**\n   * The container for the content.\n   * @default 'body'\n   */\n  readonly container = input<HTMLElement | string | null>(this.config.container, {\n    alias: 'ngpNavigationMenuTriggerContainer',\n  });\n\n  /**\n   * The cooldown duration in milliseconds.\n   * When moving from one navigation menu item to another within this duration,\n   * the showDelay is skipped for the new item.\n   * @default 300\n   */\n  readonly cooldown = input<number, NumberInput>(this.config.cooldown, {\n    alias: 'ngpNavigationMenuTriggerCooldown',\n    transform: numberAttribute,\n  });\n\n  private readonly state = ngpNavigationMenuTrigger({\n    content: this.content,\n    disabled: this.disabled,\n    placement: this.placement,\n    offset: this.offset,\n    flip: this.flip,\n    shift: this.shift,\n    container: this.container,\n    cooldown: this.cooldown,\n  });\n\n  /**\n   * Whether the content is currently open.\n   */\n  readonly open = this.state.open;\n\n  constructor() {\n    ngpRovingFocusItem({\n      disabled: this.disabled,\n    });\n  }\n\n  /**\n   * Show the content.\n   */\n  show(): void {\n    this.state.show();\n  }\n\n  /**\n   * Hide the content.\n   */\n  hide(): void {\n    this.state.hide();\n  }\n}\n","import { NumberInput } from '@angular/cdk/coercion';\nimport { Directive, input, numberAttribute, output } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { injectNavigationMenuConfig } from '../config/navigation-menu-config';\nimport { ngpNavigationMenu, provideNavigationMenuState } from './navigation-menu-state';\n\n/**\n * The `NgpNavigationMenu` directive is the root container for a navigation menu.\n * Apply this to a `<nav>` element for proper semantics.\n */\n@Directive({\n  selector: '[ngpNavigationMenu]',\n  exportAs: 'ngpNavigationMenu',\n  providers: [provideNavigationMenuState({ inherit: false })],\n  host: {\n    role: 'navigation',\n  },\n})\nexport class NgpNavigationMenu {\n  /**\n   * Access the global navigation menu configuration.\n   */\n  private readonly config = injectNavigationMenuConfig();\n\n  /**\n   * The orientation of the navigation menu.\n   * @default 'horizontal'\n   */\n  readonly orientation = input<NgpOrientation>(this.config.orientation, {\n    alias: 'ngpNavigationMenuOrientation',\n  });\n\n  /**\n   * The delay in milliseconds before showing content on hover.\n   * @default 200\n   */\n  readonly showDelay = input<number, NumberInput>(this.config.showDelay, {\n    alias: 'ngpNavigationMenuShowDelay',\n    transform: numberAttribute,\n  });\n\n  /**\n   * The delay in milliseconds before hiding content.\n   * @default 150\n   */\n  readonly hideDelay = input<number, NumberInput>(this.config.hideDelay, {\n    alias: 'ngpNavigationMenuHideDelay',\n    transform: numberAttribute,\n  });\n\n  /**\n   * The currently active (open) item value.\n   */\n  readonly value = input<string | null>(null, {\n    alias: 'ngpNavigationMenuValue',\n  });\n\n  /**\n   * Emits when the active item changes.\n   */\n  readonly valueChange = output<string | null>({\n    alias: 'ngpNavigationMenuValueChange',\n  });\n\n  private readonly state = ngpNavigationMenu({\n    orientation: this.orientation,\n    showDelay: this.showDelay,\n    hideDelay: this.hideDelay,\n    value: this.value,\n    onValueChange: value => this.valueChange.emit(value),\n  });\n\n  /**\n   * Set the active item programmatically.\n   * @param value The item value to activate (or null to close all)\n   */\n  setActiveItem(value: string | null): void {\n    this.state.setActiveItem(value);\n  }\n\n  /**\n   * Set the orientation programmatically.\n   * @param orientation The orientation\n   */\n  setOrientation(orientation: NgpOrientation): void {\n    this.state.setOrientation(orientation);\n  }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAuEO,MAAM,2BAA2B,GAA4B;AAClE,IAAA,WAAW,EAAE,YAAY;AACzB,IAAA,SAAS,EAAE,GAAG;AACd,IAAA,SAAS,EAAE,GAAG;AACd,IAAA,SAAS,EAAE,cAAc;AACzB,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,SAAS,EAAE,MAAM;AACjB,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,QAAQ,EAAE,GAAG;;MAGF,4BAA4B,GAAG,IAAI,cAAc,CAC5D,8BAA8B;AAGhC;;;;AAIG;AACG,SAAU,2BAA2B,CAAC,MAAwC,EAAA;IAClF,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,4BAA4B;AACrC,YAAA,QAAQ,EAAE,EAAE,GAAG,2BAA2B,EAAE,GAAG,MAAM,EAAE;AACxD,SAAA;KACF;AACH;AAEA;;;AAGG;SACa,0BAA0B,GAAA;AACxC,IAAA,OAAO,MAAM,CAAC,4BAA4B,EAAE,EAAE,QAA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