import{a as e,n as t}from"./preload-helper-DxX6f4wy.js";import{$ as n,E as r,F as i,I as a,O as o,P as s,_ as c,d as l,f as u,g as d,u as f}from"./Fade-Bj1YUcWe.js";import{t as p}from"./ButtonBase-dVPwHUcG.js";import{r as m}from"./Menu-DT9JOTRT.js";import{u as h}from"./InputBase-Twl1xf9g.js";function g(e){return i(`MuiDivider`,e)}var _=s(`MuiDivider`,[`root`,`absolute`,`fullWidth`,`inset`,`middle`,`flexItem`,`light`,`vertical`,`withChildren`,`withChildrenVertical`,`textAlignRight`,`textAlignLeft`,`wrapper`,`wrapperVertical`]);function v(e){return i(`MuiListItemIcon`,e)}var y=s(`MuiListItemIcon`,[`root`,`alignItemsFlexStart`]),b=s(`MuiListItemText`,[`root`,`multiline`,`dense`,`inset`,`primary`,`secondary`]),x=e(t());function S(e){return i(`MuiMenuItem`,e)}var C=s(`MuiMenuItem`,[`root`,`focusVisible`,`dense`,`disabled`,`divider`,`gutters`,`selected`]),w=n(),T=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},E=e=>{let{disabled:t,dense:n,divider:i,disableGutters:a,selected:o,classes:s}=e,c=r({root:[`root`,n&&`dense`,t&&`disabled`,!a&&`gutters`,i&&`divider`,o&&`selected`]},S,s);return{...s,...c}},D=d(p,{shouldForwardProp:e=>c(e)||e===`classes`,name:`MuiMenuItem`,slot:`Root`,overridesResolver:T})(u(({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`}},[`&.${C.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:o(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${C.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:o(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${C.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:o(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})`:o(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${C.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${C.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${_.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${_.inset}`]:{marginLeft:52},[`& .${b.root}`]:{marginTop:0,marginBottom:0},[`& .${b.inset}`]:{paddingLeft:36},[`& .${y.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up(`sm`)]:{minHeight:`auto`}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${y.root} svg`]:{fontSize:`1.25rem`}}}]}))),O=x.forwardRef(function(e,t){let n=l({props:e,name:`MuiMenuItem`}),{autoFocus:r=!1,component:i=`li`,dense:o=!1,divider:s=!1,disableGutters:c=!1,focusVisibleClassName:u,role:d=`menuitem`,tabIndex:p,className:g,..._}=n,v=x.useContext(m),y=x.useMemo(()=>({dense:o||v.dense||!1,disableGutters:c}),[v.dense,o,c]),b=x.useRef(null);h(()=>{r&&b.current&&b.current.focus()},[r]);let S={...n,dense:y.dense,divider:s,disableGutters:c},C=E(n),T=f(b,t),O;return n.disabled||(O=p===void 0?-1:p),(0,w.jsx)(m.Provider,{value:y,children:(0,w.jsx)(D,{ref:T,role:d,tabIndex:O,component:i,focusVisibleClassName:a(C.focusVisible,u),className:a(C.root,g),..._,ownerState:S,classes:C})})});export{v as n,g as r,O as t};