"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var tooltip_styles_exports = {};
__export(tooltip_styles_exports, {
  getTooltipStyles: () => getTooltipStyles
});
module.exports = __toCommonJS(tooltip_styles_exports);
const getTooltipStyles = (isError, followMouse, tooltipOffset, place) => {
  const getFontFamily = () => {
    const fontFamily = "Helvetica Neue";
    if (typeof window !== "undefined") {
      const stylesContainer = document.querySelector(`[data-hook=ricos-portal]`) || document.body;
      const styles = window.getComputedStyle(stylesContainer);
      return styles.getPropertyValue("--ricos-settings-text-font-family") || fontFamily;
    }
    return fontFamily;
  };
  return {
    style: {
      background: isError ? "#F64D43" : "rgb(0,0,0)",
      color: "white",
      padding: "8px 12px",
      fontFamily: getFontFamily(),
      border: "solid 1px rgba(255,255,255,0.38)",
      maxWidth: "180px",
      position: followMouse ? "relative" : "absolute",
      fontSize: "14px",
      marginTop: place === "top" && tooltipOffset ? Math.abs(tooltipOffset.y) : tooltipOffset?.y,
      pointerEvents: "none",
      transition: "none",
      fontWeight: "400",
      zIndex: 1e6
    },
    arrowStyle: {
      color: isError ? "#F64D43" : "rgb(0,0,0)",
      borderColor: "rgba(255,255,255,0.38)",
      pointerEvents: "none",
      transition: "none"
    }
  };
};
//# sourceMappingURL=tooltip-styles.js.map
