import{A as e,o as a,a4 as l,i as t}from"./vendor-element-C6D3GHVC.js";import{i as r,N as s}from"./index-BhVZTysP.js";import{t as u,r as o,c,v as d,O as i,B as n,H as v,u as p,I as m,M as b,ar as x,L as g,F as h,x as y,bD as f}from"./vendor-core-B-NFAs71.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=f(u({__name:"CardSelectionModal",props:{cards:{},theme:{},selectedId:{}},emits:["select"],setup(u,{emit:f}){const L=u,V=f,A=o(""),D=c(()=>A.value?L.cards.filter(e=>e.content.toLowerCase().includes(A.value.toLowerCase())):L.cards),F=r(),M=c(()=>"black_gold"===L.theme),N=c(()=>"spring_festival"===L.theme),T=c(()=>"winter"===L.theme),z=c(()=>"summer"===L.theme),B=c(()=>F.systemThemeType===s.DARK),H=c(()=>M.value||N.value||T.value||B.value);return(r,s)=>{const o=a,c=t;return y(),d("div",k,[i(o,{modelValue:A.value,"onUpdate:modelValue":s[0]||(s[0]=e=>A.value=e),placeholder:"搜索号码...",class:v(["mb-4",M.value?"dark-input":N.value?"spring-input":T.value?"winter-input":z.value?"summer-input":B.value?"night-input":""]),"prefix-icon":p(e),clearable:"",size:"large"},null,8,["modelValue","class","prefix-icon"]),n("div",w,[(y(!0),d(b,null,x(D.value,e=>(y(),d("div",{key:e.id,class:v(["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",[M.value?"dark-card":N.value?"spring-card":T.value?"winter-card":z.value?"summer-card":B.value?"night-card":"bg-white border-gray-200 hover:border-blue-200 hover:bg-blue-50",e.id===u.selectedId?M.value?"dark-card-selected":N.value?"spring-card-selected":T.value?"winter-card-selected":z.value?"summer-card-selected":B.value?"night-card-selected":"!border-blue-500 ring-1 ring-blue-500":""]]),onClick:a=>(e=>{V("select",e)})(e)},[n("span",{class:"font-medium truncate w-full px-2",title:e.content},g(e.content),9,I),void 0!==e.price&&null!==e.price?(y(),d("span",{key:0,class:v(["text-xs mt-1",M.value||N.value?"text-amber-400":T.value?"text-cyan-400":z.value?"text-blue-500":B.value?"text-blue-400":"text-orange-500"])}," ¥"+g(Number(e.price).toFixed(2)),3)):m("",!0),e.id===u.selectedId?(y(),d("div",C,[i(c,{class:v(M.value||N.value?"text-amber-400":T.value?"text-cyan-400":z.value?"text-blue-500":B.value?"text-blue-400":"text-blue-500")},{default:h(()=>[i(p(l))]),_:1},8,["class"])])):(y(),d("div",{key:2,class:v(["absolute top-0 right-0 w-0 h-0 border-t-[16px] border-r-[16px] border-transparent transition-all",M.value||N.value?"group-hover:border-amber-500/20":T.value?"group-hover:border-cyan-500/20":(z.value||B.value,"group-hover:border-blue-500/20")])},null,2)),e.id!==u.selectedId?(y(),d("div",j,[i(c,{class:v(M.value||N.value?"text-amber-400":T.value?"text-cyan-400":z.value?"text-blue-500":B.value?"text-blue-400":"text-blue-500")},{default:h(()=>[i(p(l))]),_:1},8,["class"])])):m("",!0)],10,_))),128)),0===D.value.length?(y(),d("div",{key:0,class:v(["col-span-full text-center py-8",H.value?"text-slate-400":"text-gray-400"])}," 未找到匹配号码 ",2)):m("",!0)])])}}}),[["__scopeId","data-v-6f073081"]]);export{L as default};
