"use client"; import { MainNavTabs as MainNavTabsComponent } from "@pythnetwork/component-library/MainNavTabs"; import { TabPanel as UnstyledTabPanel, Tabs, } from "@pythnetwork/component-library/unstyled/Tabs"; import { useSelectedLayoutSegment, usePathname } from "next/navigation"; import { type ComponentProps } from "react"; import { type VariantArg, LayoutTransition } from "../LayoutTransition"; export const TabRoot = ( props: Omit, "selectedKey">, ) => { const tabId = useSelectedLayoutSegment() ?? ""; return ; }; export const MainNavTabs = ( props: Omit< ComponentProps, "pathname" | "items" >, ) => { const pathname = usePathname(); return ( ); }; export const TabPanel = ({ children, ...props }: Omit, "id">) => { const tabId = useSelectedLayoutSegment() ?? ""; return ( {(args) => ( ({ opacity: 0, x: isMovingLeft(custom) ? "-2%" : "2%", }), exit: (custom) => ({ opacity: 0, x: isMovingLeft(custom) ? "2%" : "-2%", transition: { x: { type: "spring", bounce: 0 }, }, }), }} initial="initial" animate={{ opacity: 1, x: 0, transition: { x: { type: "spring", bounce: 0 }, }, }} exit="exit" > {typeof children === "function" ? children(args) : children} )} ); }; const isMovingLeft = ({ segment, prevSegment }: VariantArg): boolean => segment === null || (segment === "publishers" && prevSegment === "price-feeds");