import{m as T,n as V,f as j,dg as P,cX as E,q as F,r as l,t as G,c$ as L,c_ as N,j as y,v as C,w as U,y as c}from"./index-e0c07a84.js";import{e as $}from"./Select-a8f8fd6a.js";import{d as x}from"./dividerClasses-6c6c8dc7.js";import{l as I}from"./listItemTextClasses-e9c46ccd.js";import{l as M}from"./listItemIconClasses-129e65e5.js";function D(e){return T("MuiMenuItem",e)}const H=V("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),r=H,z=(e,t)=>{const{ownerState:s}=e;return[t.root,s.dense&&t.dense,s.divider&&t.divider,!s.disableGutters&&t.gutters]},q=e=>{const{disabled:t,dense:s,divider:a,disableGutters:i,selected:d,classes:o}=e,n=U({root:["root",s&&"dense",t&&"disabled",!i&&"gutters",a&&"divider",d&&"selected"]},D,o);return{...o,...n}},W=j(P,{shouldForwardProp:e=>E(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:z})(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})`:c(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}))`:c(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}))`: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)}},[`&.${r.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${r.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${x.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${x.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"}}}]}))),X=l.forwardRef(function(t,s){const a=G({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:d="li",dense:o=!1,divider:f=!1,disableGutters:n=!1,focusVisibleClassName:O,role:k="menuitem",tabIndex:m,className:R,...w}=a,g=l.useContext($),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=q(a),S=N(p,s);let b;return a.disabled||(b=m!==void 0?m:-1),y.jsx($.Provider,{value:v,children:y.jsx(W,{ref:S,role:k,tabIndex:b,component:d,focusVisibleClassName:C(u.focusVisible,O),className:C(u.root,R),...w,ownerState:B,classes:u})})}),Y=X;export{Y as M};
