import{j as C,d as b,a5 as c,ac as o,r as h,o as t,m as l,F as x,A as z,ad as u,ae as B,e as F,w,c as I,L as R,f as q}from"./index.js";import{i as L}from"./icon-772f21c3.js";const g={class:"go-apple-control-btn"},E=["onClick"],M=b({__name:"index",props:{mini:{request:!1,type:Boolean,default:!1},disabled:{request:!1,type:Boolean,default:!1},hidden:{request:!1,type:Array,default(){return[]}},narrow:{request:!1,type:Boolean,default:!1}},emits:["close","remove","resize","fullResize"],setup(s,{emit:d}){const a=s,{CloseIcon:f,RemoveIcon:m,ResizeIcon:_}=L.ionicons5,p=c(()=>y.filter(i=>a.hidden.findIndex(r=>i.key==r)===-1)),v=c(()=>a.narrow&&o(!0)),y=[{title:"\u5173\u95ED",key:"close",icon:f},{title:"\u7F29\u5C0F",key:"remove",icon:m},{title:v.value?"\u7F29\u5C0F":"\u653E\u5927",key:a.narrow?"fullResize":"resize",icon:_}],k=e=>{e==="fullResize"&&o(),e==="remove"&&o(!0)&&o(),d(e)};return(e,i)=>{const r=h("n-icon");return t(),l("div",g,[(t(!0),l(x,null,z(q(p),n=>(t(),l("div",{key:n.key,class:u(["btn",[n.key,s.disabled&&"disabled",s.mini&&"mini"]]),onClick:B(A=>k(n.key),["stop"])},[F(r,{size:"10",class:u(["icon-base",{hover:!s.disabled}])},{default:w(()=>[(t(),I(R(n.icon)))]),_:2},1032,["class"])],10,E))),128))])}}});var N=C(M,[["__scopeId","data-v-56375fab"]]);export{N as M};
