analytica-frontend-lib
Version:
Repositório público dos componentes utilizados nas plataformas da Analytica Ensino
54 lines (45 loc) • 2.87 kB
JavaScript
;Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
var _chunkANT66KVKjs = require('./chunk-ANT66KVK.js');
var _chunkTN3AYOMVjs = require('./chunk-TN3AYOMV.js');
var _chunkAOUX6XXNjs = require('./chunk-AOUX6XXN.js');
// src/components/Quiz/TeacherFeedbackSection.tsx
var _react = require('react');
var _Paperclip = require('@phosphor-icons/react/dist/csr/Paperclip');
var _jsxruntime = require('react/jsx-runtime');
var TeacherFeedbackSection = _react.forwardRef.call(void 0, ({ className }, ref) => {
const { getActivityFeedback } = _chunkAOUX6XXNjs.useQuizStore.call(void 0, );
const feedback = getActivityFeedback();
if (!_optionalChain([feedback, 'optionalAccess', _ => _.teacherFeedback]) && !_optionalChain([feedback, 'optionalAccess', _2 => _2.attachment])) {
return null;
}
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
"div",
{
ref,
className: _chunkTN3AYOMVjs.cn.call(void 0,
"bg-background border border-border-100 rounded-lg p-4 mt-6",
className
),
children: [
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkANT66KVKjs.Text_default, { className: "text-sm font-bold text-text-950 mb-3", children: "Observa\xE7\xE3o do Professor" }),
feedback.teacherFeedback && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkANT66KVKjs.Text_default, { size: "sm", className: "text-text-700 whitespace-pre-wrap mb-3", children: feedback.teacherFeedback }),
feedback.attachment && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
"a",
{
href: feedback.attachment,
target: "_blank",
rel: "noopener noreferrer",
className: "inline-flex items-center gap-2 px-3 py-2 bg-secondary-100 rounded-full text-text-800 hover:bg-secondary-200 transition-colors",
children: [
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Paperclip.PaperclipIcon, { size: 16 }),
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkANT66KVKjs.Text_default, { size: "sm", weight: "medium", color: "text-text-800", children: "Ver anexo" })
]
}
)
]
}
);
});
TeacherFeedbackSection.displayName = "TeacherFeedbackSection";
exports.TeacherFeedbackSection = TeacherFeedbackSection;
//# sourceMappingURL=chunk-UJDAXO77.js.map