2 lines
2.2 KiB
JavaScript
2 lines
2.2 KiB
JavaScript
import{u as y,t as _}from"./wheel-classiccasinowheel-DHnlMe5J.js";import{d as v,a as s,b as l,e,n as a,u as i,F as f,f as d,t as b,g as k}from"./vendor-vue-kYoPQr5S.js";const B={class:"relative w-full max-w-[340px] xs:max-w-[380px] sm:max-w-[420px] aspect-square mx-auto select-none"},S={class:"absolute inset-0 rounded-full p-2 bg-slate-800/80 backdrop-blur border border-slate-700 shadow-2xl"},F={class:"w-full h-full rounded-full relative overflow-hidden bg-slate-900"},C=["d","fill"],z=["transform"],L={x:"150",y:"45","text-anchor":"middle",fill:"#ffffff","font-size":"11","font-weight":"600",class:"wheel-slice-text tracking-normal font-sans"},P=["href"],D=["cx","cy"],M={class:"absolute -top-2.5 left-1/2 -translate-x-1/2 z-20 pointer-events-none drop-shadow-md"},W=v({__name:"MinimalFlatWheel",props:{segments:{},targetSegmentIndex:{},spinning:{type:Boolean}},emits:["spin-finished"],setup(r,{emit:c}){const m=r,u=c,{wheelStyle:h,pointerStyle:p,getSlicePath:x,getTextRotation:g,pegs:w}=y(m,()=>u("spin-finished"),{radius:142,pegRadius:144});return(N,o)=>(s(),l("div",B,[e("div",S,[e("div",F,[(s(),l("svg",{class:"w-full h-full",style:a(i(h)),viewBox:"0 0 300 300"},[(s(!0),l(f,null,d(r.segments,(t,n)=>(s(),l("g",{key:t.id},[e("path",{d:i(x)(n),fill:t.color||(n%2===0?"#3b82f6":"#6366f1"),stroke:"#ffffff","stroke-width":"1"},null,8,C),e("g",{transform:i(g)(n)},[e("text",L,b(i(_)(t.title)),1),t.image?(s(),l("image",{key:0,href:t.image,x:"138",y:"54",width:"24",height:"24"},null,8,P)):k("",!0)],8,z)]))),128)),(s(!0),l(f,null,d(i(w),(t,n)=>(s(),l("circle",{key:n,cx:t.x,cy:t.y,r:"2",fill:"#ffffff",opacity:"0.8"},null,8,D))),128)),o[0]||(o[0]=e("circle",{cx:"150",cy:"150",r:"28",fill:"#ffffff",filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.2))"},null,-1)),o[1]||(o[1]=e("circle",{cx:"150",cy:"150",r:"14",fill:"#0f172a"},null,-1))],4))])]),e("div",M,[e("div",{style:a(i(p)),class:"w-7 h-[34px] origin-[50%_6px] will-change-transform"},[...o[2]||(o[2]=[e("svg",{width:"28",height:"34",viewBox:"0 0 28 34",fill:"none",class:"overflow-visible"},[e("path",{d:"M14 34L2 6C0.5 3 2.5 0 6 0H22C25.5 0 27.5 3 26 6L14 34Z",fill:"#3b82f6",stroke:"#ffffff","stroke-width":"2"})],-1)])],4)])]))}});export{W as default};
|