{"version":3,"file":"SideNavItemContent.cjs","names":["_styled","_interopRequireDefault","require","_react","_i18n","_index","_OdysseyDesignTokensContext","_ScreenReaderText","_UiShellProvider","_SideNavItemContentContext","_SideNavItemLinkContent","_SortableOverlay","_jsxRuntime","e","__esModule","default","sideNavListItemShouldForwardProp","prop","sideNavListItemStyles","isSelected","odysseyDesignTokens","sideNavContrastColors","display","alignItems","backgroundColor","borderRadius","BorderRadiusMain","transition","TransitionDurationMain","color","fontColor","TypographyColorAction","itemSelectedBackgroundColor","HueBlue50","StyledSideNavListItem","exports","styled","shouldForwardProp","StyledSideNavListItemAsDiv","SideNavListItem","forwardRef","isWithinSortableList","sideNavListItemProps","sideNavListItemRef","jsx","ref","displayName","scrollToNode","node","scrollIntoView","behavior","block","inline","getActiveRowBackgroundStyles","itemHoverBackgroundColor","HueNeutral50","getBaseNavItemContentStyles","isDisabled","isDragActive","isActiveDropTarget","width","textDecoration","TypographyColorHeading","minHeight","paddingBlock","Spacing3","paddingInlineEnd","Spacing4","cursor","fontWeight","TypographyWeightBodyBold","TypographyColorDisabled","itemDisabledFontColor","outline","boxShadow","focusRingColor","PalettePrimaryMain","getNavItemContentStyles","contextValue","paddingInlineStart","Spacing6","depth","isCompact","Spacing1","NavItemContentContainer","absolutePaddingStart","StyledNavItemLink","_Link2","SideNavItemContent","count","id","label","href","target","startIcon","severity","statusLabel","endIcon","onClick","ariaControls","isExpanded","scrollRef","onItemSelected","translate","uiShellContext","useUiShellContext","sidenavItemContentContext","useSideNavItemContent","useMemo","useOdysseyDesignTokens","t","useTranslation","setIsActiveDropTarget","useState","isGrabbed","useDragOverlayContext","localScrollRef","useRef","useImperativeHandle","current","itemClickHandler","useCallback","event","sideNavItemContentKeyHandler","key","preventDefault","onDragLeave","onDragOver","onDrop","children","undefined","role","SideNavItemLinkContent","onKeyDown","tabIndex","jsxs","Fragment","ScreenReaderText","className","ExternalLinkIcon","MemoizedSideNavItemContent","memo"],"sources":["../../../../src/ui-shell/SideNav/SideNavItemContent.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport styled from \"@emotion/styled\";\nimport { Link as NavItemLink } from \"@mui/material\";\nimport {\n  forwardRef,\n  type HTMLAttributes,\n  KeyboardEventHandler,\n  memo,\n  MouseEventHandler,\n  type Ref,\n  useCallback,\n  useImperativeHandle,\n  useMemo,\n  useRef,\n  useState,\n} from \"react\";\n\nimport type { SideNavItem } from \"./types.js\";\n\nimport { useTranslation } from \"../../i18n.generated/i18n.js\";\nimport { ExternalLinkIcon } from \"../../icons.generated/index.js\";\nimport {\n  type DesignTokens,\n  useOdysseyDesignTokens,\n} from \"../../OdysseyDesignTokensContext.js\";\nimport { ScreenReaderText } from \"../../ScreenReaderText.js\";\nimport {\n  UiShellColors,\n  useUiShellContext,\n} from \"../../ui-shell/UiShellProvider.js\";\nimport {\n  SideNavItemContentContextValue,\n  useSideNavItemContent,\n} from \"./SideNavItemContentContext.js\";\nimport { SideNavItemLinkContent } from \"./SideNavItemLinkContent.js\";\nimport { useDragOverlayContext } from \"./SortableList/SortableOverlay.js\";\n\ntype SideNavListItemStyleProps = {\n  isSelected?: boolean;\n  odysseyDesignTokens: DesignTokens;\n  sideNavContrastColors?: UiShellColors[\"sideNavContrastColors\"];\n};\n\nconst sideNavListItemShouldForwardProp = (prop: string) =>\n  prop !== \"isSelected\" &&\n  prop !== \"odysseyDesignTokens\" &&\n  prop !== \"sideNavContrastColors\";\n\nconst sideNavListItemStyles = ({\n  isSelected,\n  odysseyDesignTokens,\n  sideNavContrastColors,\n}: SideNavListItemStyleProps) => ({\n  display: \"flex\",\n  alignItems: \"center\",\n  backgroundColor: \"unset\",\n  borderRadius: odysseyDesignTokens.BorderRadiusMain,\n  transition: `backgroundColor ${odysseyDesignTokens.TransitionDurationMain}, color ${odysseyDesignTokens.TransitionDurationMain}`,\n\n  ...(isSelected && {\n    color: sideNavContrastColors?.fontColor\n      ? `${sideNavContrastColors.fontColor}`\n      : `${odysseyDesignTokens.TypographyColorAction}`,\n    backgroundColor:\n      sideNavContrastColors?.itemSelectedBackgroundColor ||\n      odysseyDesignTokens.HueBlue50,\n  }),\n});\n\nexport const StyledSideNavListItem = styled(\"li\", {\n  shouldForwardProp: sideNavListItemShouldForwardProp,\n})<SideNavListItemStyleProps>(sideNavListItemStyles);\n\n// Inside a sortable list, `SortableItem` supplies the `<li>`, so the item content renders this `<div>` variant instead — nesting a `<li>` (or its own one-item `<ul>`) inside each row would break the list's screen-reader semantics.\nconst StyledSideNavListItemAsDiv = styled(\"div\", {\n  shouldForwardProp: sideNavListItemShouldForwardProp,\n})<SideNavListItemStyleProps>(sideNavListItemStyles);\n\ntype SideNavListItemProps = HTMLAttributes<HTMLElement> &\n  SideNavListItemStyleProps & {\n    // When rendered inside a sortable list, the root element is a `<div>` rather than the default `<li>` (see `StyledSideNavListItemAsDiv`).\n    isWithinSortableList?: boolean;\n  };\n\n// Selecting the `<li>` or `<div>` root inside JSX and asserting a single styled type would mistype the forwarded ref as `HTMLLIElement` even when the DOM\n// node is a `<div>`. Wrapping the choice in a `forwardRef<HTMLElement>` keeps the ref honestly typed for both variants.\nconst SideNavListItem = forwardRef<HTMLElement, SideNavListItemProps>(\n  ({ isWithinSortableList, ...sideNavListItemProps }, sideNavListItemRef) =>\n    isWithinSortableList ? (\n      <StyledSideNavListItemAsDiv\n        {...sideNavListItemProps}\n        ref={sideNavListItemRef as Ref<HTMLDivElement>}\n      />\n    ) : (\n      <StyledSideNavListItem\n        {...sideNavListItemProps}\n        ref={sideNavListItemRef as Ref<HTMLLIElement>}\n      />\n    ),\n);\nSideNavListItem.displayName = \"SideNavListItem\";\n\nconst scrollToNode = (node: HTMLElement | null) => {\n  if (node) {\n    node?.scrollIntoView({\n      behavior: \"instant\",\n      block: \"center\",\n      inline: \"nearest\",\n    });\n  }\n};\n\ntype ScrollIntoViewHandle = {\n  scrollIntoView: () => void;\n};\n\n// The row's active background: neutral by default, or the selected-item blue + action color when selected. Shared by the drag-active and hover/focus states so they stay identical.\nconst getActiveRowBackgroundStyles = ({\n  isSelected,\n  odysseyDesignTokens,\n  sideNavContrastColors,\n}: {\n  isSelected?: boolean;\n  odysseyDesignTokens: DesignTokens;\n  sideNavContrastColors: UiShellColors[\"sideNavContrastColors\"];\n}) => ({\n  backgroundColor:\n    sideNavContrastColors?.itemHoverBackgroundColor ||\n    odysseyDesignTokens.HueNeutral50,\n\n  ...(isSelected && {\n    backgroundColor:\n      sideNavContrastColors?.itemSelectedBackgroundColor ||\n      odysseyDesignTokens.HueBlue50,\n    color:\n      sideNavContrastColors?.fontColor ||\n      odysseyDesignTokens.TypographyColorAction,\n  }),\n});\n\nexport const getBaseNavItemContentStyles = ({\n  isDisabled,\n  isDragActive,\n  isSelected,\n  odysseyDesignTokens,\n  sideNavContrastColors,\n  isActiveDropTarget,\n}: {\n  isActiveDropTarget: boolean;\n  isDisabled?: boolean;\n  // True for the copy shown during a drag (the overlay). Applies the row's active background independent of hover/focus, so mouse and keyboard drags look identical. See getBaseNavItemContentStyles usage of isActiveDropTarget.\n  isDragActive?: boolean;\n  isSelected?: boolean;\n  odysseyDesignTokens: DesignTokens;\n  sideNavContrastColors: UiShellColors[\"sideNavContrastColors\"];\n}) => ({\n  display: \"flex\",\n  alignItems: \"center\",\n  width: \"100%\",\n  textDecoration: \"none\",\n  // !important needed here to override more specific base link styling\n  color: sideNavContrastColors?.fontColor\n    ? `${sideNavContrastColors?.fontColor} !important`\n    : `${odysseyDesignTokens.TypographyColorHeading} !important`,\n  minHeight: \"unset\",\n  paddingBlock: odysseyDesignTokens.Spacing3,\n  paddingInlineEnd: odysseyDesignTokens.Spacing4,\n  borderRadius: odysseyDesignTokens.BorderRadiusMain,\n  transition: `backgroundColor ${odysseyDesignTokens.TransitionDurationMain}, color ${odysseyDesignTokens.TransitionDurationMain}`,\n  cursor: \"pointer\",\n  ...(isActiveDropTarget && {\n    backgroundColor:\n      sideNavContrastColors?.itemHoverBackgroundColor ||\n      odysseyDesignTokens.HueNeutral50,\n  }),\n\n  // The dragged copy (overlay) carries the active row background regardless of hover/focus, so keyboard and mouse drags render identically. The hover selector below only fires for pointer hover / handle focus, which the overlay copy never has.\n  ...(isDragActive &&\n    getActiveRowBackgroundStyles({\n      isSelected,\n      odysseyDesignTokens,\n      sideNavContrastColors,\n    })),\n\n  // When hover or focus of the drag handle, apply general hover styles\n  \"&:hover, li:has(> button:hover, > button:focus, > button:focus-visible) &\": {\n    textDecoration: \"none\",\n    ...getActiveRowBackgroundStyles({\n      isSelected,\n      odysseyDesignTokens,\n      sideNavContrastColors,\n    }),\n\n    ...(isDisabled && {\n      backgroundColor: \"unset\",\n    }),\n  },\n\n  ...(isSelected && {\n    color: sideNavContrastColors?.fontColor\n      ? `${sideNavContrastColors?.fontColor} !important`\n      : `${odysseyDesignTokens.TypographyColorAction} !important`,\n    fontWeight: odysseyDesignTokens.TypographyWeightBodyBold,\n  }),\n\n  ...(isDisabled && {\n    cursor: \"default\",\n    color: `${odysseyDesignTokens.TypographyColorDisabled} !important`,\n\n    ...(sideNavContrastColors?.itemDisabledFontColor && {\n      color: `${sideNavContrastColors?.itemDisabledFontColor} !important`,\n    }),\n  }),\n\n  \"&:focus-visible\": {\n    outline: \"none\",\n    boxShadow: `inset 0 0 0 2px ${sideNavContrastColors?.focusRingColor || odysseyDesignTokens.PalettePrimaryMain}`,\n  },\n});\n\nexport const getNavItemContentStyles = ({\n  odysseyDesignTokens,\n  contextValue,\n  paddingInlineStart = odysseyDesignTokens.Spacing6,\n}: {\n  contextValue: SideNavItemContentContextValue;\n  odysseyDesignTokens: DesignTokens;\n  paddingInlineStart?: string;\n}) => ({\n  paddingInlineStart: `calc(${odysseyDesignTokens.Spacing4} * ${contextValue.depth} + ${paddingInlineStart})`,\n\n  ...(contextValue.depth === 1 && {\n    paddingInlineStart: odysseyDesignTokens.Spacing4,\n  }),\n\n  ...(contextValue.isCompact && {\n    paddingBlock: odysseyDesignTokens.Spacing1,\n  }),\n});\n\nconst NavItemContentContainer = styled(\"div\", {\n  shouldForwardProp: (prop) =>\n    prop !== \"odysseyDesignTokens\" &&\n    prop != \"contextValue\" &&\n    prop !== \"isDisabled\" &&\n    prop !== \"isDragActive\" &&\n    prop !== \"sideNavContrastColors\" &&\n    prop !== \"isSelected\" &&\n    prop !== \"isActiveDropTarget\",\n})<{\n  contextValue: SideNavItemContentContextValue;\n  isActiveDropTarget: boolean;\n  isDisabled?: boolean;\n  isDragActive?: boolean;\n  isSelected?: boolean;\n  odysseyDesignTokens: DesignTokens;\n  sideNavContrastColors: UiShellColors[\"sideNavContrastColors\"];\n}>(\n  ({\n    isDisabled,\n    isDragActive,\n    isSelected,\n    contextValue,\n    odysseyDesignTokens,\n    sideNavContrastColors,\n    isActiveDropTarget,\n  }) => ({\n    ...getBaseNavItemContentStyles({\n      isDisabled,\n      isDragActive,\n      isSelected,\n      odysseyDesignTokens,\n      sideNavContrastColors,\n      isActiveDropTarget,\n    }),\n\n    ...getNavItemContentStyles({\n      odysseyDesignTokens,\n      contextValue,\n      paddingInlineStart: contextValue.absolutePaddingStart,\n    }),\n  }),\n);\n\nconst StyledNavItemLink = styled(NavItemLink, {\n  shouldForwardProp: (prop) =>\n    prop != \"contextValue\" &&\n    prop !== \"isDisabled\" &&\n    prop !== \"isDragActive\" &&\n    prop !== \"isSelected\" &&\n    prop !== \"odysseyDesignTokens\" &&\n    prop !== \"sideNavContrastColors\" &&\n    prop !== \"isActiveDropTarget\",\n})<{\n  contextValue: SideNavItemContentContextValue;\n  isActiveDropTarget: boolean;\n  isDisabled?: boolean;\n  isDragActive?: boolean;\n  isSelected?: boolean;\n  odysseyDesignTokens: DesignTokens;\n  sideNavContrastColors: UiShellColors[\"sideNavContrastColors\"];\n}>(\n  ({\n    isDisabled,\n    isDragActive,\n    isSelected,\n    contextValue,\n    odysseyDesignTokens,\n    sideNavContrastColors,\n    isActiveDropTarget,\n  }) => ({\n    ...getBaseNavItemContentStyles({\n      isDisabled,\n      isDragActive,\n      isSelected,\n      odysseyDesignTokens,\n      sideNavContrastColors,\n      isActiveDropTarget,\n    }),\n\n    ...getNavItemContentStyles({\n      odysseyDesignTokens,\n      contextValue,\n      paddingInlineStart: contextValue.absolutePaddingStart,\n    }),\n  }),\n);\n\nconst SideNavItemContent = ({\n  count,\n  id,\n  label,\n  href,\n  target,\n  startIcon,\n  severity,\n  statusLabel,\n  endIcon,\n  onClick,\n  isDisabled,\n  ariaControls,\n  isExpanded,\n  isSelected,\n  scrollRef,\n  onItemSelected,\n  translate,\n}: Pick<\n  SideNavItem,\n  | \"count\"\n  | \"id\"\n  | \"label\"\n  | \"href\"\n  | \"target\"\n  | \"startIcon\"\n  | \"severity\"\n  | \"statusLabel\"\n  | \"endIcon\"\n  | \"onClick\"\n  | \"isDisabled\"\n  | \"ariaControls\"\n  | \"isExpanded\"\n  | \"isSelected\"\n  | \"translate\"\n> & {\n  onItemSelected?: (selectedItemId: string) => void;\n  /**\n   * The ref used to scroll to this item\n   */\n  scrollRef?: React.RefObject<ScrollIntoViewHandle>;\n}) => {\n  const uiShellContext = useUiShellContext();\n  const sidenavItemContentContext = useSideNavItemContent();\n  const contextValue = useMemo(\n    () => sidenavItemContentContext,\n    [sidenavItemContentContext],\n  );\n\n  const odysseyDesignTokens = useOdysseyDesignTokens();\n  const { t } = useTranslation();\n  const [isActiveDropTarget, setIsActiveDropTarget] = useState(false);\n  // True only for the copy rendered inside the DragOverlay (the visible copy during a drag), so the active row background shows for both mouse and keyboard drags rather than relying on pointer hover / handle focus.\n  const { isGrabbed } = useDragOverlayContext();\n\n  const localScrollRef = useRef<HTMLElement>(null);\n  useImperativeHandle(scrollRef, () => {\n    return {\n      scrollIntoView: () => {\n        scrollToNode(localScrollRef.current);\n      },\n    };\n  }, []);\n\n  const itemClickHandler = useCallback<\n    MouseEventHandler<HTMLDivElement | HTMLAnchorElement>\n  >(\n    (event) => {\n      onItemSelected?.(id);\n      onClick?.(event);\n    },\n    [id, onClick, onItemSelected],\n  );\n\n  const sideNavItemContentKeyHandler = useCallback<\n    KeyboardEventHandler<HTMLDivElement>\n  >(\n    (event) => {\n      if (event?.key === \"Enter\") {\n        event.preventDefault();\n        onItemSelected?.(id);\n        onClick?.(event);\n      }\n    },\n    [id, onClick, onItemSelected],\n  );\n\n  return (\n    <SideNavListItem\n      id={id}\n      isSelected={isSelected}\n      isWithinSortableList={contextValue.isWithinSortableList}\n      key={id}\n      odysseyDesignTokens={odysseyDesignTokens}\n      onDragLeave={() => {\n        setIsActiveDropTarget(false);\n      }}\n      onDragOver={() => {\n        setIsActiveDropTarget(true);\n      }}\n      onDrop={() => {\n        setIsActiveDropTarget(false);\n      }}\n      ref={localScrollRef}\n      sideNavContrastColors={uiShellContext?.sideNavContrastColors}\n    >\n      {\n        // Use Link for nav items with links and div for disabled or non-link items\n        isDisabled ? (\n          // `aria-disabled` is only announced on a widget role, so the disabled state lives on this `role=\"button\"` element (mirroring the interactive branch below and the disabled accordion summary) rather than the wrapper, whose `listitem` role (or plain `<div>` in sortable mode) can't carry a disabled state for AT.\n          <NavItemContentContainer\n            aria-current={isSelected ? \"page\" : undefined}\n            aria-disabled={isDisabled}\n            contextValue={contextValue}\n            data-se=\"tb--sidenav-text-container\"\n            isActiveDropTarget={false}\n            isDisabled={isDisabled}\n            isSelected={isSelected}\n            odysseyDesignTokens={odysseyDesignTokens}\n            role=\"button\"\n            sideNavContrastColors={uiShellContext?.sideNavContrastColors}\n          >\n            <SideNavItemLinkContent\n              count={count}\n              endIcon={endIcon}\n              label={label}\n              severity={severity}\n              startIcon={startIcon}\n              statusLabel={statusLabel}\n              translate={translate}\n            />\n          </NavItemContentContainer>\n        ) : !href ? (\n          <NavItemContentContainer\n            aria-controls={ariaControls}\n            aria-current={isSelected ? \"page\" : undefined}\n            aria-expanded={isExpanded}\n            contextValue={contextValue}\n            data-se=\"tb--sidenav-text-container\"\n            isActiveDropTarget={isActiveDropTarget}\n            isDisabled={isDisabled}\n            isDragActive={isGrabbed}\n            isSelected={isSelected}\n            odysseyDesignTokens={odysseyDesignTokens}\n            onClick={itemClickHandler}\n            onKeyDown={sideNavItemContentKeyHandler}\n            role=\"button\"\n            sideNavContrastColors={uiShellContext?.sideNavContrastColors}\n            tabIndex={0}\n          >\n            <SideNavItemLinkContent\n              count={count}\n              endIcon={endIcon}\n              label={label}\n              severity={severity}\n              startIcon={startIcon}\n              statusLabel={statusLabel}\n              translate={translate}\n            />\n          </NavItemContentContainer>\n        ) : (\n          <StyledNavItemLink\n            aria-current={isSelected ? \"page\" : undefined}\n            contextValue={contextValue}\n            data-se=\"tb--sidenav-text-container\"\n            href={href}\n            isActiveDropTarget={isActiveDropTarget}\n            isDisabled={isDisabled}\n            isDragActive={isGrabbed}\n            isSelected={isSelected}\n            odysseyDesignTokens={odysseyDesignTokens}\n            onClick={itemClickHandler}\n            sideNavContrastColors={uiShellContext?.sideNavContrastColors}\n            target={target}\n          >\n            <SideNavItemLinkContent\n              count={count}\n              endIcon={endIcon}\n              label={label}\n              severity={severity}\n              startIcon={startIcon}\n              statusLabel={statusLabel}\n              translate={translate}\n            />\n            {target === \"_blank\" && (\n              <>\n                <ScreenReaderText translate={translate}>\n                  {t(\"link.external.newwindow\")}\n                </ScreenReaderText>\n                <span className=\"Link-indicator\" role=\"presentation\">\n                  <ExternalLinkIcon />\n                </span>\n              </>\n            )}\n          </StyledNavItemLink>\n        )\n      }\n    </SideNavListItem>\n  );\n};\n\nconst MemoizedSideNavItemContent = memo(SideNavItemContent);\nMemoizedSideNavItemContent.displayName = \"SideNavItemContent\";\n\nexport { MemoizedSideNavItemContent as SideNav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