// tmp-babel/navigations/web/NavMini/NavSectionMini/NavList/NavItem/styled.js
import ListItemButton from "@mui/material/ListItemButton";
import { alpha, styled } from "@mui/material/styles";
function _typeof(o) {
  "@babel/helpers - typeof";
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
    return typeof o2;
  } : function(o2) {
    return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
  }, _typeof(o);
}
function ownKeys(e, r) {
  var t = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var o = Object.getOwnPropertySymbols(e);
    r && (o = o.filter(function(r2) {
      return Object.getOwnPropertyDescriptor(e, r2).enumerable;
    })), t.push.apply(t, o);
  }
  return t;
}
function _objectSpread(e) {
  for (var r = 1; r < arguments.length; r++) {
    var t = null != arguments[r] ? arguments[r] : {};
    r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
      _defineProperty(e, r2, t[r2]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
      Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
    });
  }
  return e;
}
function _defineProperty(e, r, t) {
  return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e;
}
function _toPropertyKey(t) {
  var i = _toPrimitive(t, "string");
  return "symbol" == _typeof(i) ? i : i + "";
}
function _toPrimitive(t, r) {
  if ("object" != _typeof(t) || !t) return t;
  var e = t[Symbol.toPrimitive];
  if (void 0 !== e) {
    var i = e.call(t, r || "default");
    if ("object" != _typeof(i)) return i;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return ("string" === r ? String : Number)(t);
}
var StyledNavItem = styled(ListItemButton, {
  shouldForwardProp: function shouldForwardProp(prop) {
    return prop !== "active";
  }
})(function(_ref) {
  var active = _ref.active, open = _ref.open, depth = _ref.depth, theme = _ref.theme;
  var subItem = depth !== 1;
  var opened = open && !active;
  var lightMode = theme.palette.mode === "light";
  var noWrapStyles = {
    width: "100%",
    maxWidth: "100%",
    display: "block",
    overflow: "hidden",
    whiteSpace: "nowrap",
    textOverflow: "ellipsis"
  };
  var baseStyles = {
    item: {
      borderRadius: 6,
      color: theme.palette.text.secondary
    },
    icon: {
      width: 22,
      height: 22,
      flexShrink: 0
    },
    label: {
      textTransform: "capitalize"
    },
    caption: {
      color: theme.palette.text.disabled
    }
  };
  return _objectSpread(_objectSpread(_objectSpread({}, !subItem && _objectSpread(_objectSpread(_objectSpread({}, baseStyles.item), {}, {
    fontSize: 10,
    minHeight: 56,
    lineHeight: "16px",
    textAlign: "center",
    flexDirection: "column",
    justifyContent: "center",
    padding: theme.spacing(0.5),
    margin: theme.spacing(0, 0.5),
    fontWeight: theme.typography.fontWeightSemiBold,
    "& .icon": _objectSpread({}, baseStyles.icon),
    "& .label": _objectSpread(_objectSpread(_objectSpread({}, noWrapStyles), baseStyles.label), {}, {
      marginTop: theme.spacing(0.5)
    }),
    "& .caption": _objectSpread(_objectSpread({}, baseStyles.caption), {}, {
      top: 11,
      left: 6,
      position: "absolute"
    }),
    "& .arrow": {
      top: 11,
      right: 6,
      position: "absolute"
    }
  }, active && {
    fontWeight: theme.typography.fontWeightBold,
    backgroundColor: alpha(theme.palette.primary.main, 0.08),
    color: lightMode ? theme.palette.primary.main : theme.palette.primary.light,
    "&:hover": {
      backgroundColor: alpha(theme.palette.primary.main, 0.16)
    }
  }), opened && {
    color: theme.palette.text.primary,
    backgroundColor: theme.palette.action.hover
  })), subItem && _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, baseStyles.item), theme.typography.body2), {}, {
    minHeight: 34,
    padding: theme.spacing(0, 1),
    fontWeight: theme.typography.fontWeightMedium,
    "& .icon": _objectSpread(_objectSpread({}, baseStyles.icon), {}, {
      marginRight: theme.spacing(1)
    }),
    "& .label": _objectSpread(_objectSpread({}, baseStyles.label), {}, {
      flexGrow: 1
    }),
    "& .caption": _objectSpread(_objectSpread({}, baseStyles.caption), {}, {
      marginLeft: theme.spacing(0.75)
    }),
    "& .info": {
      display: "inline-flex",
      marginLeft: theme.spacing(0.75)
    },
    "& .arrow": {
      marginLeft: theme.spacing(0.75),
      marginRight: theme.spacing(-0.5)
    }
  }, active && {
    color: theme.palette.text.primary,
    backgroundColor: theme.palette.action.selected,
    fontWeight: theme.typography.fontWeightSemiBold
  }), opened && {
    color: theme.palette.text.primary,
    backgroundColor: theme.palette.action.hover
  })), {}, {
    "&:hover": {
      svg: {
        color: active ? theme.palette.primary.main : theme.palette.grey[600]
      }
    },
    svg: {
      color: active ? theme.palette.primary.main : theme.palette.grey[600]
    }
  });
});

export {
  StyledNavItem
};
//# sourceMappingURL=chunk-VEVAU62B.mjs.map