import { jsx as _jsx } from "react/jsx-runtime";
import { useAtomValue } from 'jotai';
import { getExamples } from '../../models/index.js';
import { Row } from '../common/index.js';
import { ExamplesWrap } from './styled.components.js';
import { Example } from '../PayloadSamples/index.js';
import { globalParserAtom } from '../../jotai/store.js';
import { layoutAtom } from '../../jotai/app.js';
export const RedocExample = ({ pointer, mimeType, encoding }) => {
    const parser = useAtomValue(globalParserAtom);
    const layout = useAtomValue(layoutAtom);
    const example = getExamples({
        parser,
        infoOrRef: { $ref: pointer },
        mime: mimeType,
        encoding,
    });
    return (_jsx(Row, { layout: layout, children: _jsx(ExamplesWrap, { children: _jsx(Example, { example: example, mimeType: mimeType }) }) }));
};
//# sourceMappingURL=RedocExample.js.map