import{B as e,A as a,a5 as l,i as t}from"./vendor-element-B74pkaZM.js";import{k as r,K as s,b as u}from"./index-n5dZU89t.js";import{t as o,r as c,c as d,v as i,O as n,B as v,H as p,u as m,I as b,M as x,aq as g,L as h,F as y,x as f}from"./vendor-core-k7kcNcJz.js";const k={class:"card-selection-container"},w={class:"grid grid-cols-2 gap-3 max-h-[300px] overflow-y-auto pr-1 custom-scrollbar"},_=["onClick"],I=["title"],C={key:1,class:"absolute top-1 right-1"},j={key:3,class:"absolute top-1 right-1 opacity-0 group-hover:opacity-100 transition-opacity"},L=u(o({__name:"CardSelectionModal",props:{cards:{},theme:{},selectedId:{}},emits:["select"],setup(u,{emit:o}){const L=u,V=o,A=c(""),B=d(()=>A.value?L.cards.filter(e=>e.content.toLowerCase().includes(A.value.toLowerCase())):L.cards),F=r(),K=d(()=>"black_gold"===L.theme),M=d(()=>"spring_festival"===L.theme),T=d(()=>"winter"===L.theme),q=d(()=>"summer"===L.theme),z=d(()=>F.systemThemeType===s.DARK),D=d(()=>K.value||M.value||T.value||z.value);return(r,s)=>{const o=a,c=t;return f(),i("div",k,[n(o,{modelValue:A.value,"onUpdate:modelValue":s[0]||(s[0]=e=>A.value=e),placeholder:"搜索号码...",class:p(["mb-4",K.value?"dark-input":M.value?"spring-input":T.value?"winter-input":q.value?"summer-input":z.value?"night-input":""]),"prefix-icon":m(e),clearable:"",size:"large"},null,8,["modelValue","class","prefix-icon"]),v("div",w,[(f(!0),i(x,null,g(B.value,e=>(f(),i("div",{key:e.id,class:p(["p-3 rounded-lg border cursor-pointer transition-all hover:shadow-md text-center flex flex-col items-center justify-center min-h-[60px] relative overflow-hidden group",[K.value?"dark-card":M.value?"spring-card":T.value?"winter-card":q.value?"summer-card":z.value?"night-card":"bg-white border-gray-200 hover:border-blue-200 hover:bg-blue-50",e.id===u.selectedId?K.value?"dark-card-selected":M.value?"spring-card-selected":T.value?"winter-card-selected":q.value?"summer-card-selected":z.value?"night-card-selected":"!border-blue-500 ring-1 ring-blue-500":""]]),onClick:a=>(e=>{V("select",e)})(e)},[v("span",{class:"font-medium truncate w-full px-2",title:e.content},h(e.content),9,I),void 0!==e.price&&null!==e.price?(f(),i("span",{key:0,class:p(["text-xs mt-1",K.value||M.value?"text-amber-400":T.value?"text-cyan-400":q.value?"text-blue-500":z.value?"text-blue-400":"text-orange-500"])}," ¥"+h(Number(e.price).toFixed(2)),3)):b("",!0),e.id===u.selectedId?(f(),i("div",C,[n(c,{class:p(K.value||M.value?"text-amber-400":T.value?"text-cyan-400":q.value?"text-blue-500":z.value?"text-blue-400":"text-blue-500")},{default:y(()=>[n(m(l))]),_:1},8,["class"])])):(f(),i("div",{key:2,class:p(["absolute top-0 right-0 w-0 h-0 border-t-[16px] border-r-[16px] border-transparent transition-all",K.value||M.value?"group-hover:border-amber-500/20":T.value?"group-hover:border-cyan-500/20":(q.value||z.value,"group-hover:border-blue-500/20")])},null,2)),e.id!==u.selectedId?(f(),i("div",j,[n(c,{class:p(K.value||M.value?"text-amber-400":T.value?"text-cyan-400":q.value?"text-blue-500":z.value?"text-blue-400":"text-blue-500")},{default:y(()=>[n(m(l))]),_:1},8,["class"])])):b("",!0)],10,_))),128)),0===B.value.length?(f(),i("div",{key:0,class:p(["col-span-full text-center py-8",D.value?"text-slate-400":"text-gray-400"])}," 未找到匹配号码 ",2)):b("",!0)])])}}}),[["__scopeId","data-v-6f073081"]]);export{L as default};
