import{bh as O,bi as k,d as T,bA as V,by as F,bj as P,r as l,bk as U,bq as E,bt as G,j as y,bm as C,bn as N,e as c}from"./index-43bf7a1c.js";import{a as I}from"./List-6fcc4821.js";import{d as x}from"./dividerClasses-497df10c.js";import{l as $}from"./listItemTextClasses-0ea25cee.js";function Z(e){return O("MuiListItemIcon",e)}const D=k("MuiListItemIcon",["root","alignItemsFlexStart"]),M=D;function H(e){return O("MuiMenuItem",e)}const z=k("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),i=z,q=(e,t)=>{const{ownerState:s}=e;return[t.root,s.dense&&t.dense,s.divider&&t.divider,!s.disableGutters&&t.gutters]},A=e=>{const{disabled:t,dense:s,divider:a,disableGutters:r,selected:d,classes:o}=e,n=N({root:["root",s&&"dense",t&&"disabled",!r&&"gutters",a&&"divider",d&&"selected"]},H,o);return{...o,...n}},W=T(V,{shouldForwardProp:e=>F(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:q})(P(({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"}},[`&.${i.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:c(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${i.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:c(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${i.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:c(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})`:c(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${i.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${i.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${x.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${x.inset}`]:{marginLeft:52},[`& .${$.root}`]:{marginTop:0,marginBottom:0},[`& .${$.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"}}}]}))),J=l.forwardRef(function(t,s){const a=U({props:t,name:"MuiMenuItem"}),{autoFocus:r=!1,component:d="li",dense:o=!1,divider:b=!1,disableGutters:n=!1,focusVisibleClassName:R,role:w="menuitem",tabIndex:m,className:S,...B}=a,g=l.useContext(I),f=l.useMemo(()=>({dense:o||g.dense||!1,disableGutters:n}),[g.dense,o,n]),p=l.useRef(null);E(()=>{r&&p.current&&p.current.focus()},[r]);const L={...a,dense:f.dense,divider:b,disableGutters:n},u=A(a),j=G(p,s);let v;return a.disabled||(v=m!==void 0?m:-1),y.jsx(I.Provider,{value:f,children:y.jsx(W,{ref:j,role:w,tabIndex:v,component:d,focusVisibleClassName:C(u.focusVisible,R),className:C(u.root,S),...B,ownerState:L,classes:u})})}),_=J;export{_ as M,Z as g};
