import{d as L,bW as N,B as U,X as W,ar as H,r,j as x,o as a,f as m,l,u as e,c as _,b as h,z as b,i as z,p as g,A as F,aA as K,F as X,C as j,R as q,ag as V,_ as D}from"./index-ongssuUn.js";const M={class:"wooden-fish"},G={class:"btn-box"},J=["title"],O=["title"],Q=["title"],Y={class:"ml-4"},Z=["src"],ee=["src"],se={class:"soce"},te=L({name:"WoodenFishContent",__name:"content",setup(oe){const{AddList:A,addFloatText:E,playSound:I,addScore:T}=N(),$=U(),u=W(),C=()=>{T(),E(80),f.value&&(f.value.style.transform="rotate(0deg)"),setTimeout(()=>{f.value.style.transform="rotate(15deg)"},50),v.value&&I()},n=r(!1),f=r();let p;const k=t=>{t?n.value=t:n.value=!n.value,n.value?(i.value=!1,clearInterval(p),p=setInterval(()=>{C()},d.value)):clearInterval(p)};H(()=>{$.openComponentList.findIndex(t=>t.component=="WoodenFish")==-1&&(n.value=!1,clearInterval(p))});const v=r(!0),P=()=>{v.value=!v.value},d=r(600),i=r(!1),y=r(u.woodenFish.text),S=()=>{i.value=!i.value,i.value&&n.value&&k(!1)},w=()=>{const t=y.value.trim();u.woodenFish.text=t||"功德",i.value=!1};return(t,s)=>{const c=x("svg-icon"),B=x("el-slider"),R=x("el-input");return a(),m("div",M,[l("div",G,[l("span",{onClick:s[0]||(s[0]=o=>k()),class:"play-icon",title:t.$t("自动敲木鱼")},[e(n)?(a(),_(c,{key:0,class:"btn cursor-pointer",name:"fa fa-pause-circle",size:"24"})):(a(),_(c,{key:1,class:"btn cursor-pointer",name:"fa fa-play-circle",size:"24"}))],8,J),l("span",{onClick:S,class:"play-icon",title:t.$t("编辑文字")},[h(c,{class:"btn cursor-pointer",name:"fa fa-pencil",size:"24"})],8,O),l("span",{onClick:P,class:"play-icon",title:t.$t("敲击声音")},[e(v)?(a(),_(c,{key:1,class:"btn",name:"fa fa-volume-up",size:"24"})):(a(),_(c,{key:0,class:"btn",name:"fa fa-volume-off",size:"24"}))],8,Q),e(n)?(a(),m("div",{key:0,class:"el-slider-box",onClick:s[3]||(s[3]=b(()=>{},["stop"]))},[h(B,{size:"small",min:100,max:3e3,step:50,modelValue:e(d),"onUpdate:modelValue":s[1]||(s[1]=o=>z(d)?d.value=o:null),onChange:s[2]||(s[2]=o=>k(!0))},null,8,["modelValue"]),l("span",Y,g(e(d))+"ms",1)])):F("",!0),e(i)?(a(),m("div",{key:1,class:"edit-text-box",onClick:s[5]||(s[5]=b(()=>{},["stop"]))},[h(R,{modelValue:e(y),"onUpdate:modelValue":s[4]||(s[4]=o=>z(y)?y.value=o:null),size:"small",maxlength:"10",onKeyup:K(w,["enter"])},null,8,["modelValue"]),h(c,{class:"confirm-icon",name:"fa fa-check",size:"18",title:t.$t("确定"),onClick:w},null,8,["title"])])):F("",!0)]),l("div",{class:"wooden-fish-content",onClick:b(C,["stop"])},[(a(!0),m(X,null,j(e(A),o=>(a(),m("div",{key:o.id,class:"add",style:q({"--angle":o.angle+"deg","--offset-x":o.offsetX+"px"})},g(e(u).woodenFish.text)+" +1 ",5))),128)),l("img",{class:"fish-img cursor-pointer",src:`${e(V)}/yy_image/muyu.webp`},null,8,Z),l("img",{class:"hammer-img",ref_key:"hammerRef",ref:f,src:`${e(V)}/yy_image/hammer.webp`},null,8,ee),l("div",se,g(e(u).woodenFish.text)+":"+g(e(u).woodenFish.score),1)])])}}}),le=D(te,[["__scopeId","data-v-bc8d30a3"]]);export{le as default};
