import { faCheck, faCopy } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { Link } from "@tanstack/react-router"; import { twMerge } from "tailwind-merge"; import { useTimedReset } from "@app/hooks"; import { createNotification } from "../notifications"; import { IconButton, Tooltip } from "../v2"; type Props = { secretPathSegments: string[]; selectedPathSegmentIndex: number; environmentSlug: string; projectId: string; disableCopy?: boolean; }; export const SecretDashboardPathBreadcrumb = ({ secretPathSegments, selectedPathSegmentIndex, environmentSlug, projectId, disableCopy }: Props) => { const [, isCopying, setIsCopying] = useTimedReset({ initialState: false }); const newSecretPath = `/${secretPathSegments.slice(0, selectedPathSegmentIndex + 1).join("/")}`; const isLastItem = secretPathSegments.length === selectedPathSegmentIndex + 1; const folderName = secretPathSegments.at(selectedPathSegmentIndex); return (