import{_}from"./_plugin-vue_export-helper.1703796278973.js";import{k as f,m as y,r as h,o as i,x as d,F as k,h as S,E as p,D as v,u as b,z as o,B as x,A as C,b as z}from"./vue.1703796278973.js";const B=["onClick"],N={class:"card-list"},A=["src"],I={class:"checked-icon"},O={__name:"PlatformType",props:{options:{type:Array,default:()=>[],required:!0},model:{validator:function(s){return["multiple","singular"].includes(s)},default:()=>"singular"},value:{type:String,default:()=>""},disabled:{type:Boolean,default:()=>!0},className:{type:String},itemStyle:{type:Object,default:()=>{}}},emits:["update:value","change"],setup(s,{emit:r}){const e=s,n=f(e.model&&e.model==="singular"?[e.value]:e.value),g=t=>{if(!e.disabled){const c=n.value.includes(t),a=[...n.value],l=e.model&&e.model==="singular";c?a.splice(c,1):e.model&&e.model==="singular"?a[0]=t:a.push(t),r("update:value",l?a[0]:a),r("change",l?a[0]:a)}};return y(()=>e.value,t=>{n.value=e.model&&e.model==="singular"?[t]:t}),(t,c)=>{const a=h("AIcon");return i(),d("div",{class:v(["radio-card-items",s.className,s.disabled?"disabled":""])},[(i(!0),d(k,null,S(s.options,l=>{var u,m;return i(),d("div",{key:l.value,style:p(s.itemStyle),class:v(["radio-card-item",b(n).includes(l.value)?"checked":""]),onClick:P=>g(l.value)},[o("div",N,[o("div",null,[l.imgUrl?(i(),d("img",{key:0,style:p(`width: ${(u=l.imgSize)==null?void 0:u[0]}; height: ${(m=l.imgSize)==null?void 0:m[1]}`),src:l.imgUrl,alt:""},null,12,A)):x("",!0)]),o("div",null,C(l.label),1)]),o("div",I,[o("div",null,[z(a,{type:"CheckOutlined"})])])],14,B)}),128))],2)}}},w=_(O,[["__scopeId","data-v-514f9102"]]);export{w as default};
