import{N as m,d as y,aP as B,ae as b,o as u,e as c,V as w,aA as $,b0 as d,u as f,aQ as h,r as I,w as v,aR as p,q as k,bz as C}from"./index-LFx1jIjH.js";import{z as g,m as L,B as P}from"./Button-SUce42c3.js";import{_ as M}from"./_plugin-vue_export-helper-DlAUqK2U.js";const S=e=>{const l=m(()=>{const{variant:n,showMenuBtn:t,...s}=e,i={...s,"aria-label":e["aria-label"]};return g(n).with("compact",()=>({...i,density:e.density||"compact",class:e.class?`list-item-compact ${e.class}`:"list-item-compact"})).with("comfortable",()=>({...i,density:e.density||"comfortable",class:e.class?`list-item-comfortable ${e.class}`:"list-item-comfortable"})).with("default",()=>({...i,class:e.class?`list-item-default ${e.class}`:"list-item-default"})).otherwise(()=>({...i,class:e.class?`list-item-default ${e.class}`:"list-item-default"}))}),o=m(()=>L("list-item-main",e.variant&&`list-item--${e.variant}`));return{listItemProps:l,listItemClasses:o}},D={variant:"default",showMenuBtn:!1,link:!1},N=y({__name:"ListItem",props:B({showMenuBtn:{type:Boolean},variant:{},active:{type:Boolean},disabled:{type:Boolean},link:{type:Boolean},nav:{type:Boolean},density:{},height:{},lines:{type:[String,Boolean]},subtitle:{},title:{},value:{},color:{},rounded:{type:[Boolean,String,Number]},tag:{},to:{},href:{},replace:{type:Boolean},exact:{type:Boolean},class:{},style:{},"aria-label":{},role:{}},D),emits:["click","menu","input"],setup(e){const l=e,{listItemProps:o,listItemClasses:n}=S(l);return(t,s)=>{const i=C("hold");return b((u(),c(w,$(f(o),{class:f(n),onClick:s[1]||(s[1]=a=>t.$emit("click",a)),onContextmenu:s[2]||(s[2]=d(a=>t.$emit("menu",a),["right","prevent"])),onInput:s[3]||(s[3]=a=>t.$emit("input",a))}),h({_:2},[I(t.$slots,(a,r)=>({name:r,fn:v(()=>[p(t.$slots,r,{},void 0,!0)])})),t.$slots.append||t.showMenuBtn?{name:"append",fn:v(()=>[p(t.$slots,"append",{},void 0,!0),t.showMenuBtn?(u(),c(P,{key:0,variant:"icon",icon:"mdi-dots-vertical","aria-label":"Show context menu",onClick:s[0]||(s[0]=d(a=>t.$emit("menu",a),["stop"]))})):k("",!0)]),key:"0"}:void 0]),1040,["class"])),[[i,a=>t.$emit("menu",a)]])}}}),A=M(N,[["__scopeId","data-v-e242bb46"]]);export{A as L};
