import MonacoEditor from "~/components/editors/MonacoEditor"; import ExternalLinkEmptyIcon from "~/components/ui/icons/ExternalLinkEmptyIcon"; import { ApiSpecsDto } from "../services/ApiSpecsService"; import { Link } from "react-router"; import clsx from "clsx"; import { useTranslation } from "react-i18next"; export default function ApiSpecs({ item, className = "h-96 overflow-auto", withLinkToDocs = true, postmanCollectionUrl = "/postman_collection.json", showPostmanCollection = true, }: { item: ApiSpecsDto; className?: string; withLinkToDocs?: boolean; postmanCollectionUrl?: string | null; showPostmanCollection?: boolean; }) { const { t } = useTranslation(); const shouldShowPostmanCollection = showPostmanCollection && Boolean(item.postmanCollection); return (