import{bk as generateUtilityClass,bl as generateUtilityClasses,bm as styled,bn as capitalize,bo as _extends,r as reactExports,bp as useThemeProps,bq as _objectWithoutPropertiesLoose,j as jsxRuntimeExports,br as clsx,bs as composeClasses}from"./js-core.esm4.js";import{a as Paper}from"./js-core.esm7.js";function getAppBarUtilityClass(o){return generateUtilityClass("MuiAppBar",o)}generateUtilityClasses("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent"]);let _excluded=["className","color","enableColorOnDark","position"],useUtilityClasses=o=>{var{color:o,position:r,classes:e}=o,o={root:["root","color"+capitalize(o),"position"+capitalize(r)]};return composeClasses(o,getAppBarUtilityClass,e)},joinVars=(o,r)=>o?`${null==o?void 0:o.replace(")","")}, ${r})`:r,AppBarRoot=styled(Paper,{name:"MuiAppBar",slot:"Root",overridesResolver:(o,r)=>{o=o.ownerState;return[r.root,r["position"+capitalize(o.position)],r["color"+capitalize(o.color)]]}})(({theme:o,ownerState:r})=>{var e="light"===o.palette.mode?o.palette.grey[100]:o.palette.grey[900];return _extends({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},"fixed"===r.position&&{position:"fixed",zIndex:(o.vars||o).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},"absolute"===r.position&&{position:"absolute",zIndex:(o.vars||o).zIndex.appBar,top:0,left:"auto",right:0},"sticky"===r.position&&{position:"sticky",zIndex:(o.vars||o).zIndex.appBar,top:0,left:"auto",right:0},"static"===r.position&&{position:"static"},"relative"===r.position&&{position:"relative"},!o.vars&&_extends({},"default"===r.color&&{backgroundColor:e,color:o.palette.getContrastText(e)},r.color&&"default"!==r.color&&"inherit"!==r.color&&"transparent"!==r.color&&{backgroundColor:o.palette[r.color].main,color:o.palette[r.color].contrastText},"inherit"===r.color&&{color:"inherit"},"dark"===o.palette.mode&&!r.enableColorOnDark&&{backgroundColor:null,color:null},"transparent"===r.color&&_extends({backgroundColor:"transparent",color:"inherit"},"dark"===o.palette.mode&&{backgroundImage:"none"})),o.vars&&_extends({},"default"===r.color&&{"--AppBar-background":r.enableColorOnDark?o.vars.palette.AppBar.defaultBg:joinVars(o.vars.palette.AppBar.darkBg,o.vars.palette.AppBar.defaultBg),"--AppBar-color":r.enableColorOnDark?o.vars.palette.text.primary:joinVars(o.vars.palette.AppBar.darkColor,o.vars.palette.text.primary)},r.color&&!r.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":r.enableColorOnDark?o.vars.palette[r.color].main:joinVars(o.vars.palette.AppBar.darkBg,o.vars.palette[r.color].main),"--AppBar-color":r.enableColorOnDark?o.vars.palette[r.color].contrastText:joinVars(o.vars.palette.AppBar.darkColor,o.vars.palette[r.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:"inherit"===r.color?"inherit":"var(--AppBar-color)"},"transparent"===r.color&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),AppBar=reactExports.forwardRef(function(o,r){var o=useThemeProps({props:o,name:"MuiAppBar"}),{className:e,color:t="primary",enableColorOnDark:a=!1,position:s="fixed"}=o,l=_objectWithoutPropertiesLoose(o,_excluded),o=_extends({},o,{color:t,position:s,enableColorOnDark:a}),t=useUtilityClasses(o);return jsxRuntimeExports.jsx(AppBarRoot,_extends({square:!0,component:"header",ownerState:o,elevation:4,className:clsx(t.root,e,"fixed"===s&&"mui-fixed"),ref:r},l))});export{AppBar as A};
