import{c as u,y as a,z as p,Z as I,G as h,A as l,$ as b,n as M,v as L,E as v,x as o,D as k,L as r,S as g,l as f,F as B,I as V}from"./index-20675090.js";import{j as w,k as $}from"./forwardRefs-67412654.js";import{e as P,b as A,d as C,V as x}from"./VMenu-ae4158ef.js";const S={props:{variant:{type:String,default:"default",validator:n=>["plain","default","responsive","icon","list"].includes(n)}},setup(n,s){const e={},t=u(()=>({...e,class:"v-btn--variant-responsive",ripple:!0,icon:!0,style:"height: min(calc(100vw - 40px), calc(100vh - 340px)); width: min(calc(100vw - 40px), calc(100vh - 340px));"})),c=u(()=>({...e,ripple:!1})),_=u(()=>({...e,density:"comfortable"}));return{btnProps:u(()=>{switch(n.variant){case"default":return e;case"plain":return e;case"responsive":return t.value;case"icon":return c.value;case"list":return _.value;default:return e}})}}};const z=(n,s)=>{const e=n.__vccOpts||n;for(const[t,c]of s)e[t]=c;return e};function D(n,s,e,t,c,_){return a(),p(w,M(t.btnProps,{variant:"plain"}),I({_:2},[h(n.$slots,(y,d)=>({name:d,fn:l(()=>[b(n.$slots,d)])}))]),1040)}const H=z(S,[["render",D]]),T=["title","innerHTML"],E=["title","innerHTML"],q=L({__name:"ProviderIcon",props:{domain:{},size:{},dark:{type:Boolean}},setup(n){const s=n,e=u(()=>s.domain in r.providers?r.providers[s.domain].domain:s.domain);return(t,c)=>(a(),v("div",{style:k(`width:${t.size}px;margin-left:10px;margin-right:10px`)},[e.value=="library"?(a(),p($,{key:0,size:t.size,icon:"mdi-bookshelf",title:t.$t("item_in_library")},null,8,["size","title"])):t.$vuetify.theme.current.dark&&o(r).providerManifests[e.value].icon_svg_dark?(a(),v("div",{key:1,style:k(`width: ${t.size}px`),title:o(r).providerManifests[e.value].name,innerHTML:o(r).providerManifests[e.value].icon_svg_dark},null,12,T)):o(r).providerManifests[e.value].icon_svg?(a(),v("div",{key:2,style:k(`width: ${t.size}px;height: ${t.size}px`),title:o(r).providerManifests[e.value].name,innerHTML:o(r).providerManifests[e.value].icon_svg},null,12,E)):o(r).providerManifests[e.value].icon?(a(),p($,{key:3,size:t.size,icon:"mdi-"+o(r).providerManifests[e.value].icon,title:o(r).providerManifests[e.value].name,dark:t.$vuetify.theme.current.dark},null,8,["size","icon","title","dark"])):(a(),p($,{key:4,size:t.size,dark:t.$vuetify.theme.current.dark,icon:"mdi-playlist-play"},null,8,["size","dark"]))],4))}}),F={components:{MAButton:H},props:{contextMenuItems:{type:Array,default:[]}},setup(n,s){const e=u(()=>({}));return{listItemProps:u(()=>({...e.value,...s.attrs}))}}};const N={key:0,class:"contextmenubtn"};function j(n,s,e,t,c,_){const y=g("MAButton"),d=g("ListItem",!0);return a(),p(x,M(t.listItemProps,{class:"list-item-main",onInput:s[0]||(s[0]=i=>n.$emit("input",i))}),I({_:2},[h(n.$slots,(i,m)=>({name:m,fn:l(()=>[b(n.$slots,m)])})),n.$slots.append?{name:"append",fn:l(()=>[b(n.$slots,"append"),e.contextMenuItems.length>0?(a(),v("div",N,[f(P,{location:"bottom end"},{activator:l(({props:i})=>[f(y,M(i,{variant:"list",icon:"mdi-dots-vertical"}),null,16)]),default:l(()=>[f(A,null,{default:l(()=>[(a(!0),v(B,null,h(e.contextMenuItems.filter(i=>i.hide!=!0),(i,m)=>(a(),p(d,{key:m,title:n.$t(i.label,i.labelArgs),disabled:i.disabled==!0,onClick:G=>i.action?i.action():""},{prepend:l(()=>[f(C,{icon:i.icon},null,8,["icon"])]),_:2},1032,["title","disabled","onClick"]))),128))]),_:1})]),_:1})])):V("",!0)]),key:"0"}:void 0]),1040)}const J=z(F,[["render",j]]);export{H as B,J as L,q as _,z as a};
