import { jsx as _jsx } from "react/jsx-runtime";
import { COMMON_REFS, modelName } from '../utils.js';
import { X } from './_X.js';
export const RefLink = ({ $ref }) => {
    if (!$ref) {
        return null;
    }
    const ref = $ref.replace('/components/schemas/', '');
    const refName = modelName(ref);
    return _jsx(X.a, { href: COMMON_REFS[ref.slice(1)] || ref, children: refName });
};
