import{bh as M,bi as k,d as j,bC as T,bA as V,bj as F,r as l,bk as P,bq as U,bt as E,j as v,bm as I,bn as G}from"./index-d2b25495.js";import{a as C}from"./List-863f013e.js";import{d as y}from"./dividerClasses-02a44d89.js";import{l as x}from"./listItemTextClasses-cadd4b00.js";function Y(s){return M("MuiListItemIcon",s)}const N=k("MuiListItemIcon",["root","alignItemsFlexStart"]),$=N;function D(s){return M("MuiMenuItem",s)}const H=k("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),i=H,z=(s,e)=>{const{ownerState:t}=s;return[e.root,t.dense&&e.dense,t.divider&&e.divider,!t.disableGutters&&e.gutters]},q=s=>{const{disabled:e,dense:t,divider:o,disableGutters:r,selected:d,classes:a}=s,n=G({root:["root",t&&"dense",e&&"disabled",!r&&"gutters",o&&"divider",d&&"selected"]},D,a);return{...a,...n}},A=j(T,{shouldForwardProp:s=>V(s)||s==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:z})(F(({theme:s})=>({...s.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:(s.vars||s).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${i.selected}`]:{backgroundColor:s.alpha((s.vars||s).palette.primary.main,(s.vars||s).palette.action.selectedOpacity),[`&.${i.focusVisible}`]:{backgroundColor:s.alpha((s.vars||s).palette.primary.main,`${(s.vars||s).palette.action.selectedOpacity} + ${(s.vars||s).palette.action.focusOpacity}`)}},[`&.${i.selected}:hover`]:{backgroundColor:s.alpha((s.vars||s).palette.primary.main,`${(s.vars||s).palette.action.selectedOpacity} + ${(s.vars||s).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:s.alpha((s.vars||s).palette.primary.main,(s.vars||s).palette.action.selectedOpacity)}},[`&.${i.focusVisible}`]:{backgroundColor:(s.vars||s).palette.action.focus},[`&.${i.disabled}`]:{opacity:(s.vars||s).palette.action.disabledOpacity},[`& + .${y.root}`]:{marginTop:s.spacing(1),marginBottom:s.spacing(1)},[`& + .${y.inset}`]:{marginLeft:52},[`& .${x.root}`]:{marginTop:0,marginBottom:0},[`& .${x.inset}`]:{paddingLeft:36},[`& .${$.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(s.vars||s).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[s.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...s.typography.body2,[`& .${$.root} svg`]:{fontSize:"1.25rem"}}}]}))),W=l.forwardRef(function(e,t){const o=P({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:d="li",dense:a=!1,divider:u=!1,disableGutters:n=!1,focusVisibleClassName:R,role:w="menuitem",tabIndex:b,className:S,...B}=o,f=l.useContext(C),g=l.useMemo(()=>({dense:a||f.dense||!1,disableGutters:n}),[f.dense,a,n]),c=l.useRef(null);U(()=>{r&&c.current&&c.current.focus()},[r]);const L={...o,dense:g.dense,divider:u,disableGutters:n},p=q(o),O=E(c,t);let m;return o.disabled||(m=b!==void 0?b:-1),v.jsx(C.Provider,{value:g,children:v.jsx(A,{ref:O,role:w,tabIndex:m,component:d,focusVisibleClassName:I(p.focusVisible,R),className:I(p.root,S),...B,ownerState:L,classes:p})})}),Z=W;export{Z as M,Y as g};
