import{n as T,o as V,f as j,ds as P,d5 as E,t as F,r as l,v as G,d9 as L,d8 as N,j as y,w as C,x as U,z as d}from"./index-60657852.js";import{e as x}from"./Select-7d2a5359.js";import{d as $}from"./dividerClasses-590294d7.js";import{l as I}from"./listItemTextClasses-81f8effc.js";import{l as M}from"./listItemIconClasses-39f47a05.js";function z(e){return T("MuiMenuItem",e)}const D=V("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),r=D,H=(e,t)=>{const{ownerState:s}=e;return[t.root,s.dense&&t.dense,s.divider&&t.divider,!s.disableGutters&&t.gutters]},W=e=>{const{disabled:t,dense:s,divider:a,disableGutters:i,selected:c,classes:o}=e,n=U({root:["root",s&&"dense",t&&"disabled",!i&&"gutters",a&&"divider",c&&"selected"]},z,o);return{...o,...n}},q=j(P,{shouldForwardProp:e=>E(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:H})(F(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${r.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:d(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${r.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:d(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${r.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:d(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:d(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${r.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${r.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${$.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${$.inset}`]:{marginLeft:52},[`& .${I.root}`]:{marginTop:0,marginBottom:0},[`& .${I.inset}`]:{paddingLeft:36},[`& .${M.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${M.root} svg`]:{fontSize:"1.25rem"}}}]}))),A=l.forwardRef(function(t,s){const a=G({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:c="li",dense:o=!1,divider:f=!1,disableGutters:n=!1,focusVisibleClassName:O,role:k="menuitem",tabIndex:m,className:R,...w}=a,g=l.useContext(x),v=l.useMemo(()=>({dense:o||g.dense||!1,disableGutters:n}),[g.dense,o,n]),p=l.useRef(null);L(()=>{i&&p.current&&p.current.focus()},[i]);const B={...a,dense:v.dense,divider:f,disableGutters:n},u=W(a),S=N(p,s);let b;return a.disabled||(b=m!==void 0?m:-1),y.jsx(x.Provider,{value:v,children:y.jsx(q,{ref:S,role:k,tabIndex:b,component:c,focusVisibleClassName:C(u.focusVisible,O),className:C(u.root,R),...w,ownerState:B,classes:u})})}),Z=A;export{Z as M};
