import{B as f,I as E,C as L}from"./app-CPb3bToC.js";import{b as I,e as S}from"./chunk-CusLMHK2.js";import{a as n,l as o,m as K,g as d}from"./chunk-DhYw-kuD.js";import{u as Q,a as R}from"./chunk-8e5kB75k.js";import{u as w,a as $}from"./chunk-CoZXVP_c.js";const N=f({name:"QItemSection",props:{avatar:Boolean,thumbnail:Boolean,side:Boolean,top:Boolean,noWrap:Boolean},setup(e,{slots:i}){const s=n(()=>`q-item__section column q-item__section--${e.avatar===!0||e.side===!0||e.thumbnail===!0?"side":"main"}`+(e.top===!0?" q-item__section--top justify-start":" justify-center")+(e.avatar===!0?" q-item__section--avatar":"")+(e.thumbnail===!0?" q-item__section--thumbnail":"")+(e.noWrap===!0?" q-item__section--nowrap":""));return()=>o("div",{class:s.value},I(i.default))}}),O=f({name:"QItem",props:{...Q,...w,tag:{type:String,default:"div"},active:{type:Boolean,default:null},clickable:Boolean,dense:Boolean,insetLevel:Number,tabindex:[String,Number],focused:Boolean,manualFocus:Boolean},emits:["click","keyup"],setup(e,{slots:i,emit:s}){const{proxy:{$q:r}}=K(),b=R(e,r),{hasLink:c,linkAttrs:q,linkClass:k,linkTag:y,navigateOnClick:g}=$(),u=d(null),l=d(null),v=n(()=>e.clickable===!0||c.value===!0||e.tag==="label"),a=n(()=>e.disable!==!0&&v.value===!0),h=n(()=>"q-item q-item-type row no-wrap"+(e.dense===!0?" q-item--dense":"")+(b.value===!0?" q-item--dark":"")+(c.value===!0&&e.active===null?k.value:e.active===!0?` q-item--active${e.activeClass!==void 0?` ${e.activeClass}`:""}`:"")+(e.disable===!0?" disabled":"")+(a.value===!0?" q-item--clickable q-link cursor-pointer "+(e.manualFocus===!0?"q-manual-focusable":"q-focusable q-hoverable")+(e.focused===!0?" q-manual-focusable--focused":""):"")),_=n(()=>e.insetLevel===void 0?null:{["padding"+(r.lang.rtl===!0?"Right":"Left")]:16+e.insetLevel*56+"px"});function B(t){a.value===!0&&(l.value!==null&&(t.qKeyEvent!==!0&&document.activeElement===u.value?l.value.focus():document.activeElement===l.value&&u.value.focus()),g(t))}function C(t){if(a.value===!0&&E(t,[13,32])===!0){L(t),t.qKeyEvent=!0;const m=new MouseEvent("click",t);m.qKeyEvent=!0,u.value.dispatchEvent(m)}s("keyup",t)}function x(){const t=S(i.default,[]);return a.value===!0&&t.unshift(o("div",{class:"q-focus-helper",tabindex:-1,ref:l})),t}return()=>{const t={ref:u,class:h.value,style:_.value,role:"listitem",onClick:B,onKeyup:C};return a.value===!0?(t.tabindex=e.tabindex||"0",Object.assign(t,q.value)):v.value===!0&&(t["aria-disabled"]="true"),o(y.value,t,x())}}});export{O as Q,N as a};
