import { jsx as _jsx } from "react/jsx-runtime";
import { useAtomValue } from 'jotai';
import { getSchema } from '../../models/index.js';
import { Row } from '../common/index.js';
import { FullWidthPanel } from './styled.components.js';
import { Schema } from '../Schema/index.js';
import { globalStoreAtom } from '../../jotai/store.js';
export const RedocSchema = ({ pointer, schema, disableDeepLinks, slug, onOneOfChange, }) => {
    const { options, parser } = useAtomValue(globalStoreAtom);
    const schemaOrRef = schema || { $ref: pointer };
    const schemaModel = getSchema({
        parser,
        schemaOrRef,
        pointer: pointer || '',
        options,
        deps: {
            operation: { pointer: 'RedocSchema' },
        },
    });
    return (_jsx(Row, { children: _jsx(FullWidthPanel, { children: _jsx(Schema, { schema: schemaModel, level: 1, disableDeepLinks: disableDeepLinks, slug: slug, onOneOfChange: onOneOfChange }) }) }));
};
//# sourceMappingURL=RedocSchema.js.map