import{O as r,d as y,aQ as b,af as p,o as c,h as u,V as w,aB as $,b1 as d,u as f,i as h,g as I,w as v,aR as B,e as k,bA as g}from"./index-Bn2Tzsay.js";import{m as C,B as L}from"./Button-r9Wpw3CQ.js";import{z as M}from"./index-CBho6rsP.js";import{_ as P}from"./_plugin-vue_export-helper-DlAUqK2U.js";const S=t=>{const l=r(()=>{const{variant:n,showMenuBtn:e,...s}=t,i={...s,"aria-label":t["aria-label"]};return M(n).with("compact",()=>({...i,density:t.density||"compact",class:t.class?`list-item-compact ${t.class}`:"list-item-compact"})).with("comfortable",()=>({...i,density:t.density||"comfortable",class:t.class?`list-item-comfortable ${t.class}`:"list-item-comfortable"})).with("default",()=>({...i,class:t.class?`list-item-default ${t.class}`:"list-item-default"})).otherwise(()=>({...i,class:t.class?`list-item-default ${t.class}`:"list-item-default"}))}),o=r(()=>C("list-item-main",t.variant&&`list-item--${t.variant}`));return{listItemProps:l,listItemClasses:o}},D={variant:"default",showMenuBtn:!1,link:!1},V=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(t){const l=t,{listItemProps:o,listItemClasses:n}=S(l);return(e,s)=>{const i=g("hold");return p((c(),u(w,$(f(o),{class:f(n),onClick:s[1]||(s[1]=a=>e.$emit("click",a)),onContextmenu:s[2]||(s[2]=d(a=>e.$emit("menu",a),["right","prevent"])),onInput:s[3]||(s[3]=a=>e.$emit("input",a))}),h({_:2},[I(e.$slots,(a,m)=>({name:m,fn:v(()=>[B(e.$slots,m,{},void 0,!0)])})),e.$slots.append||t.showMenuBtn?{name:"append",fn:v(()=>[B(e.$slots,"append",{},void 0,!0),t.showMenuBtn?(c(),u(L,{key:0,variant:"icon",icon:"mdi-dots-vertical","aria-label":"Show context menu",onClick:s[0]||(s[0]=d(a=>e.$emit("menu",a),["stop"]))})):k("",!0)]),key:"0"}:void 0]),1040,["class"])),[[i,a=>e.$emit("menu",a)]])}}}),Q=P(V,[["__scopeId","data-v-e242bb46"]]);export{Q as L};
