"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DNDAnswerContainerStory = void 0;
const react_1 = __importDefault(require("react"));
const Exam_1 = require("../../../../src/components/exam/Exam");
const DNDAnswerContainer_1 = require("../../../../src/components/exam/DNDAnswerContainer");
const ExamComponentWrapper_1 = require("../../utils/ExamComponentWrapper");
const parseExam_1 = __importDefault(require("../../../../src/parser/parseExam"));
const dom_utils_1 = require("../../../../src/dom-utils");
const DNDAnswerContainerStory = ({ masteredExam, answerMediaType }) => {
    const doc = (0, parseExam_1.default)(masteredExam.xml, true);
    const [textAnswers, imageAnswers] = (0, dom_utils_1.queryAll)(doc.documentElement, 'dnd-answer-container');
    return (react_1.default.createElement(ExamComponentWrapper_1.ExamComponentWrapper, { doc: doc, resolveAttachment: (filename) => `/${masteredExam.examCode}/attachments/${filename}` },
        react_1.default.createElement(DNDAnswerContainer_1.DNDAnswerContainer, { element: answerMediaType === 'text' ? textAnswers : imageAnswers, renderChildNodes: (0, Exam_1.renderChildNodesBase)(), renderComponentOverrides: {} })));
};
exports.DNDAnswerContainerStory = DNDAnswerContainerStory;
//# sourceMappingURL=DNDAnswerContainer.story.js.map