// tmp-babel/navigations/web/__shared__/NavSectionVertical/Group/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 deepSubItem = Number(depth) > 2;
  var noWrapStyles = {
    width: "100%",
    maxWidth: "100%",
    display: "block",
    overflow: "hidden",
    whiteSpace: "nowrap",
    textOverflow: "ellipsis"
  };
  var baseStyles = {
    item: {
      marginBottom: 4,
      borderRadius: 8,
      color: theme.palette.text.secondary,
      padding: theme.spacing(0.5, 1, 0.5, 1.5)
    },
    icon: {
      width: 24,
      height: 24,
      flexShrink: 0,
      marginRight: theme.spacing(2)
    },
    label: _objectSpread(_objectSpread(_objectSpread({}, noWrapStyles), theme.typography.body2), {}, {
      textTransform: "capitalize",
      fontWeight: theme.typography[active ? "fontWeightSemiBold" : "fontWeightMedium"]
    }),
    caption: _objectSpread(_objectSpread(_objectSpread({}, noWrapStyles), theme.typography.caption), {}, {
      color: theme.palette.text.disabled
    }),
    info: {
      display: "inline-flex",
      marginLeft: theme.spacing(0.75)
    },
    arrow: {
      flexShrink: 0,
      marginLeft: theme.spacing(0.75)
    }
  };
  return _objectSpread(_objectSpread(_objectSpread({}, !subItem && _objectSpread(_objectSpread(_objectSpread({}, baseStyles.item), {}, {
    minHeight: 44,
    "& .icon": _objectSpread({}, baseStyles.icon),
    "& .sub-icon": {
      display: "none"
    },
    "& .label": _objectSpread({}, baseStyles.label),
    "& .caption": _objectSpread({}, baseStyles.caption),
    "& .info": _objectSpread({}, baseStyles.info),
    "& .arrow": _objectSpread({}, baseStyles.arrow)
  }, active && {
    color: theme.palette.mode === "light" ? theme.palette.primary.main : theme.palette.primary.light,
    backgroundColor: alpha(theme.palette.primary.main, 0.08),
    "&:hover": {
      backgroundColor: alpha(theme.palette.primary.main, 0.16)
    }
  }), opened && {
    color: theme.palette.text.primary,
    backgroundColor: theme.palette.action.hover
  })), subItem && _objectSpread(_objectSpread({}, baseStyles.item), {}, {
    minHeight: 36,
    "& .icon": _objectSpread({}, baseStyles.icon),
    "& .sub-icon": _objectSpread(_objectSpread({}, baseStyles.icon), {}, {
      display: "flex",
      alignItems: "center",
      justifyContent: "center",
      "&:before": _objectSpread({
        content: '""',
        width: 4,
        height: 4,
        borderRadius: "50%",
        backgroundColor: theme.palette.text.disabled,
        transition: theme.transitions.create(["transform"], {
          duration: theme.transitions.duration.shorter
        })
      }, active && {
        transform: "scale(2)",
        backgroundColor: theme.palette.primary.main
      })
    }),
    "& .label": _objectSpread({}, baseStyles.label),
    "& .caption": _objectSpread({}, baseStyles.caption),
    "& .info": _objectSpread({}, baseStyles.info),
    "& .arrow": _objectSpread({}, baseStyles.arrow)
  }, active && {
    color: theme.palette.text.primary
  })), {}, {
    "&:hover": {
      svg: {
        color: active ? theme.palette.primary.main : theme.palette.grey[600]
      }
    },
    svg: {
      color: active ? theme.palette.primary.main : theme.palette.grey[600]
    }
  }, deepSubItem && {
    paddingLeft: "".concat(theme.spacing(Number(depth)), " !important")
  });
});

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