import { inferType } from "@jsonhero/json-infer-types";
import { JSONHeroPath } from "@jsonhero/path";
import { useMemo, useState } from "react";
import { useJson } from "~/hooks/useJson";
import { useJsonColumnViewState } from "~/hooks/useJsonColumnView";
import { concatenated, getHierarchicalTypes } from "~/utilities/dataType";
import { formatRawValue } from "~/utilities/formatter";
import { isNullable } from "~/utilities/nullable";
import { CopyTextButton } from "./CopyTextButton";
import { Body } from "./Primitives/Body";
import { LargeMono } from "./Primitives/LargeMono";
import { Title } from "./Primitives/Title";
import { ValueIcon, ValueIconSize } from "./ValueIcon";
export type InfoHeaderProps = {
relatedPaths: string[];
};
export function InfoHeader({ relatedPaths }: InfoHeaderProps) {
const { selectedNodeId, highlightedNodeId, selectedNodes } =
useJsonColumnViewState();
if (!selectedNodeId || !highlightedNodeId || selectedNodes.length === 0) {
return