import CwDropdown from '../dropdown/dropdown.component.js'; import CwElement from '../../internal/cw-element.js'; import CwIcon from '../icon/icon.component.js'; import type { CSSResultGroup, PropertyValues } from 'lit'; /** * @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 `