import Component from '../../components/primary-navigation-item/primary-navigation-item.component.js'; import { type EventName } from '@lit/react'; import type { CwShowEvent } from '../../events/events.js'; import type { CwAfterShowEvent } from '../../events/events.js'; import type { CwHideEvent } from '../../events/events.js'; import type { CwAfterHideEvent } from '../../events/events.js'; export type { CwShowEvent } from '../../events/events.js'; export type { CwAfterShowEvent } from '../../events/events.js'; export type { CwHideEvent } from '../../events/events.js'; export type { CwAfterHideEvent } from '../../events/events.js'; /** * @summary A top-level entry in a ``, rendered as a link or, when it has a * `` slotted in, a disclosure trigger for a dropdown of sub-links. Above the parent * navigation's mobile breakpoint, the dropdown is a floating panel; below it, the menu expands inline, full width, * in place — matching the rest of the mobile hamburger menu. * @documentation https://cordwainer.dev/components/primary-navigation-item * @status experimental * @since 1.3 * * @dependency cw-dropdown * @dependency cw-icon * * @slot - The item's label content (text, or an icon + text). * @slot menu - A `` with this item's dropdown links. Its presence switches the item * from a link to a disclosure trigger. Ignored when `href` is also set. * * @event cw-show - Emitted when the item's dropdown opens. * @event cw-after-show - Emitted after the item's dropdown opens and all animations are complete. * @event cw-hide - Emitted when the item's dropdown closes. * @event cw-after-hide - Emitted after the item's dropdown closes and all animations are complete. * * @csspart base - The component's base wrapper. * @csspart link - The internal ``, present only when `href` is set. * @csspart trigger - The internal `` above `mobile`, or the disclosure `