import{d as s,a2 as t,e as o,o as e,h as a,w as l,i,W as n,a7 as d,X as c,ba as p,bb as u,a as m,A as h,z as f,k as r,F as x,l as w,j as _,t as b,bd as v,n as y,p as g,y as k,B as L}from"./index-WeUkftbp.js";import{_ as z}from"./_plugin-vue_export-helper.BCo6x5W8.js";const C=z(s({__name:"index",props:{btnList:{default:[]},direction:{default:"right"},modelDirection:{default:"left"},id:{default:0},index:{default:-1}},emits:["select"],setup(s,{expose:z,emit:C}){const P=s,{btnList:j,direction:S,modelDirection:T,id:D,index:I}=t(P),$=o({show:!1,dotShow:!1,height:0,width:0,top:0,modalLeft:0,iTop:"-7px",iPosition:"top"}),A=()=>{$.show=!1,$.dotShow=!1},B=L(),F=s=>{const{windowHeight:t}=v();s.detail.x;const o=s.detail.y;y((()=>{let s=g().in(B);s.select(".modal").fields({size:!0},(()=>{})),s.select(".base-btn").fields({size:!0},(()=>{})),s.exec((s=>{const e=s[0].height,a=s[1].width,l=s[1].height;$.modalLeft=-a/2+"px","left"===T.value&&($.modalLeft="-140px"),t<o+e?($.top=-(e+6)+"px",$.iTop=e+"px",$.iPosition="bottom"):($.top=l+6+"px",$.iPosition="top")}))}))};let H=C;return z({close:A}),(s,t)=>{const o=f,v=k;return e(),a(o,null,{default:l((()=>[i(o,{class:"compos"},{default:l((()=>[i(o,{class:"base-btn",style:n({zIndex:$.show?22:0}),onClick:t[0]||(t[0]=d((s=>{return t=s,$.show=!$.show,void F(t);var t}),["stop"]))},{default:l((()=>[c(s.$slots,"icon",{},void 0,!0)])),_:3},8,["style"]),p(i(o,{class:"compos-content",onClick:A},null,512),[[u,$.show]]),p(i(o,{class:"modal",style:n({overflow:$.show?"":"hidden",top:$.top,[m(T)]:$.modalLeft})},{default:l((()=>[i(o,{class:h(["modal-ang","top"===$.iPosition?"top":"bottom"]),style:n({[m(S)]:"10px",top:$.iTop})},null,8,["style","class"]),i(o,{class:"modal-content"},{default:l((()=>[c(s.$slots,"default",{},(()=>[(e(!0),r(x,null,w(m(j),((s,t)=>(e(),a(o,{class:"modal-item",index:t,key:t,onClick:d((t=>{return(o=s).id=D.value,o.index=I.value,$.show=!1,$.dotShow=!1,void H("select",o);var o}),["stop"])},{default:l((()=>[i(v,{class:h(["iconfont",s.icon])},null,8,["class"]),_(" "+b(s.name||s.menu_name),1)])),_:2},1032,["index","onClick"])))),128))]),!0)])),_:3})])),_:3},8,["style"]),[[u,$.show]])])),_:3})])),_:3})}}}),[["__scopeId","data-v-842b6ce5"]]);export{C as d};
