// tmp-babel/navigations/web/__shared__/NavSectionHorizontal/NavList/NavItem/styled.js
import { ListItemButton } from "@mui/material";
import { styled } from "@mui/material/styles";
import Link from "next/link";
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, hasTabLayout = _ref.hasTabLayout;
  var subItem = depth !== 1;
  var opened = open && !active;
  var baseStyles = {
    item: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
      borderRadius: 6,
      color: theme.palette.text.secondary,
      fontWeight: theme.typography.fontWeightMedium
    }),
    icon: {
      width: 22,
      height: 22,
      flexShrink: 0,
      marginRight: theme.spacing(1)
    },
    label: {
      textTransform: "capitalize"
    },
    caption: {
      marginLeft: theme.spacing(0.75),
      color: theme.palette.text.disabled
    },
    info: {
      display: "inline-flex",
      marginLeft: theme.spacing(0.75)
    },
    arrow: {
      marginLeft: theme.spacing(0.75)
    }
  };
  return _objectSpread(_objectSpread(_objectSpread({}, !subItem && _objectSpread(_objectSpread(_objectSpread({}, baseStyles.item), {}, {
    minHeight: 32,
    flexShrink: 0,
    padding: theme.spacing(0, 0.75),
    "& .icon": _objectSpread({}, baseStyles.icon),
    "& .label": _objectSpread(_objectSpread({}, baseStyles.label), {}, {
      whiteSpace: "nowrap"
    }),
    "& .caption": _objectSpread({}, baseStyles.caption),
    "& .info": _objectSpread({}, baseStyles.info),
    "& .arrow": _objectSpread({}, baseStyles.arrow)
  }, active && {
    color: theme.palette.text.primary,
    backgroundColor: hasTabLayout ? "transparent" : theme.palette.action.selected,
    fontWeight: theme.typography.fontWeightSemiBold
  }), opened && {
    color: theme.palette.text.primary,
    backgroundColor: hasTabLayout ? "transparent" : theme.palette.action.hover
  })), subItem && _objectSpread(_objectSpread(_objectSpread({}, baseStyles.item), {}, {
    minHeight: 34,
    padding: theme.spacing(0, 1),
    "& .icon": _objectSpread({}, baseStyles.icon),
    "& .label": _objectSpread(_objectSpread({}, baseStyles.label), {}, {
      flexGrow: 1
    }),
    "& .caption": _objectSpread({}, baseStyles.caption),
    "& .info": _objectSpread({}, baseStyles.info),
    "& .arrow": _objectSpread(_objectSpread({}, baseStyles.arrow), {}, {
      marginRight: theme.spacing(-0.5)
    })
  }, active && {
    color: theme.palette.text.primary,
    backgroundColor: hasTabLayout ? "transparent" : theme.palette.action.selected,
    fontWeight: theme.typography.fontWeightSemiBold
  }), opened && {
    color: theme.palette.text.primary,
    backgroundColor: hasTabLayout ? "transparent" : theme.palette.action.hover
  })), {}, {
    "&:hover": _objectSpread(_objectSpread({}, hasTabLayout && {
      backgroundColor: "transparent"
    }), {}, {
      color: theme.palette.grey[800],
      svg: {
        color: theme.palette.grey[800]
      }
    }),
    svg: {
      color: active ? theme.palette.grey[800] : theme.palette.grey[600]
    }
  });
});
var StyledLink = styled(Link)(function(_ref2) {
  var theme = _ref2.theme, disabled = _ref2.disabled, hasTabLayout = _ref2.hasTabLayout, active = _ref2.active;
  return {
    pointerEvents: disabled ? "none" : "cursor",
    color: "inherit",
    textDecoration: "none",
    display: "flex",
    alignItems: "center",
    borderBottom: hasTabLayout && active ? "2px solid ".concat(theme.palette.grey[800]) : "none",
    "&:hover": {
      backgroundColor: hasTabLayout ? theme.palette.action.hover : "transparent"
    },
    variants: []
  };
});

export {
  StyledNavItem,
  StyledLink
};
//# sourceMappingURL=chunk-N4HQKGKW.mjs.map