import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { Value, registerWidget } from '../Value';
import { renderTypeParameters } from '../widgetUtils';
registerWidget('primitive', ({ value }) => (_jsx("span", { className: "token primitive", children: value.value })));
registerWidget('boolean', ({ value }) => (_jsx("span", { className: "token primitive", children: String(value.value) })));
registerWidget('string', ({ value }) => (_jsxs("span", { className: "token string", children: ["'", value.value, "'"] })));
registerWidget('number', ({ value }) => (_jsx("span", { className: "token number", children: value.value })));
registerWidget('generic', ({ value }) => (_jsx("span", { className: "token symbol", children: value.name })));
registerWidget('type', ({ value, doc }) => {
    return (_jsxs(_Fragment, { children: [(doc === null || doc === void 0 ? void 0 : doc.name) && (_jsxs(_Fragment, { children: [_jsx("span", { className: "token keyword", children: "type" }), ' ', _jsx("span", { className: "token symbol", children: (doc === null || doc === void 0 ? void 0 : doc.name) || 'unknown' }), renderTypeParameters(value.typeParameters), ' ', _jsx("span", { className: "token operator", children: "=" }), ' '] })), _jsx(Value, { value: value.value })] }));
});
registerWidget('infer', ({ value }) => (_jsxs(_Fragment, { children: [_jsx("span", { className: "token keyword", children: "infer" }), " ", _jsx(Value, { value: value.value })] })));
registerWidget('keyof', ({ value }) => (_jsxs(_Fragment, { children: [_jsx("span", { className: "token keyword", children: "keyof" }), " ", _jsx(Value, { value: value.name })] })));
