define(['exports', 'preact/hooks', './usePress-949a0d03', './mergeProps-bcfa6a92', './classNames-08d99695', './useInteractionStyle-15a2bdd0', './useComponentTheme-5aa41a8f', 'preact', './mergeInterpolations-9ede4cf7', './flexitem-5db48325', './UNSAFE_NavigationListCommon/themes/redwood/NavigationListItemTheme', './useUser-08901aba'], (function(e,s,t,n,o,a,i,r,l,c,d,u){"use strict";const m=r.createContext(null);function g(){return s.useContext(m)}const v=l.mergeInterpolations([...Object.values(c.flexitemInterpolations)]),{class:p,...y}=v({alignSelf:"center"});e.NavigationListContext=m,e.useNavigationListContext=g,e.useNavigationListItem=function({itemKey:e}){const{onSelectionChange:r,selection:l,currentKey:c,showFocusRing:m,navigationListItemPrefix:v,edge:C,display:I}=g(),S=c===e,N=l===e,b="icons"===I,f="end"===C,{interactionProps:H,applyPseudoHoverStyle:h,applyHoverStyle:P,applyActiveStyle:R}=a.useInteractionStyle(),{direction:x}=u.useUser(),L="rtl"===x,{classes:k,styles:{labelContainerClasses:E,navigationItemStackedBadge:O,navigationItemStackedBadgeRtl:F,startIconStacked:w}}=i.useComponentTheme(d.NavigationListItemRedwoodTheme,{focusRing:m?"isFocusRing":"notFocusRing",current:S?"isCurrent":"notCurrtent",selected:N?"isSelected":"notSelected",direction:L?"isRtl":"notRtl",hybridHover:P?"isHybridHover":"notHybridHover",pseudoHover:h?"isPseudoHover":"notPseudoHover",active:R?"isActive":"notActive",edgeEnd:"end"===C?"isEnd":"notEnd",iconOnly:b?"isIconOnly":"notIconOnly"}),A=o.classNames([w]),T=o.classNames([O,"rtl"===x&&F]),B=s.useCallback((()=>{r?.({value:e,reason:"pointer"})}),[e,r]),{pressProps:U}=t.usePress(B);return{itemId:v+e,itemHandlers:n.mergeProps(H,U),itemClasses:o.classNames([k]),isSelected:N,labelContainerClasses:o.classNames([E,p]),labelContainerStyle:y,isIconOnly:b,isEdgeEnd:f,stackedBadgeClasses:o.classNames([T]),iconOnlyClasses:o.classNames([A]),isCurrent:S,showFocusRing:m}}}));
//# sourceMappingURL=useNavigationListItem-582f5564.js.map
