"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./main-BB7fFseo.cjs"),i={class:"option-list"},u={key:0,class:"standard-text"},m=["src"],k={class:"info"},f={class:"label"},p=e.defineComponent({__name:"ImgCard",setup(v){const c=e.inject("answerItem"),s=e.inject("widget"),l=r=>{var n;switch(s.type){case"eduImgRadio":return c.answer===r.value;case"eduImgCheckbox":return console.log("answerItem.answer: ",c.answer),(n=c.answer)==null?void 0:n.some(t=>t===r.value)}return!1},o=r=>{var n,t;if(!e.isShowAnalysis.value)return"";if(s.attrs.scoreType==="single"&&s.attrs.standard.find(a=>a.id===r.value))return"(正确答案)";if(s.attrs.scoreType==="multiple"&&typeof((n=s.attrs.standard.find(a=>a.id===r.value))==null?void 0:n.mark)=="number")return`(${(t=s.attrs.standard.find(a=>a.id===r.value))==null?void 0:t.mark}分)`;if(s.attrs.scoreType==="cumulative"){const a=s.attrs.standard.find(d=>d.id===r.value);if(typeof(a==null?void 0:a.mark)=="number")return`(${a==null?void 0:a.mark}分) (正确答案)`}};return(r,n)=>(e.openBlock(),e.createElementBlock("div",i,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s).attrs.list,t=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["option-item",{checked:l(t)}]),key:t.value},[o(t)?(e.openBlock(),e.createElementBlock("div",u,e.toDisplayString(o(t)),1)):e.createCommentVNode("",!0),e.createBaseVNode("img",{src:t.url,alt:"图片选项"},null,8,m),e.createBaseVNode("div",k,[e.unref(s).type==="eduImgRadio"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["radio-icon",{checked:l(t)}])},null,2)):(e.openBlock(),e.createBlock(e.unref(e.ElCheckbox),{key:1,class:"square-icon","model-value":l(t)},null,8,["model-value"])),e.createBaseVNode("span",f,e.toDisplayString(t.label),1)])],2))),128))]))}}),_=e._export_sfc(p,[["__scopeId","data-v-502a3f4e"]]);exports.default=_;
