"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const rem = require("../../core/utils/units-converters/rem.cjs");
require("react");
const getSize = require("../../core/utils/get-size/get-size.cjs");
const createVarsResolver = require("../../core/styles-api/create-vars-resolver/create-vars-resolver.cjs");
require("clsx");
const parseThemeColor = require("../../core/MantineProvider/color-functions/parse-theme-color/parse-theme-color.cjs");
const getThemeColor = require("../../core/MantineProvider/color-functions/get-theme-color/get-theme-color.cjs");
const rgba = require("../../core/MantineProvider/color-functions/rgba/rgba.cjs");
const useProps = require("../../core/MantineProvider/use-props/use-props.cjs");
const useStyles = require("../../core/styles-api/use-styles/use-styles.cjs");
const Box = require("../../core/Box/Box.cjs");
const factory = require("../../core/factory/factory.cjs");
const Blockquote_module_css = require("./Blockquote.module.css.cjs");
const defaultProps = {
  iconSize: 48
};
const varsResolver = createVarsResolver.createVarsResolver((theme, { color, iconSize, radius }) => {
  const darkParsed = parseThemeColor.parseThemeColor({
    color: color || theme.primaryColor,
    theme,
    colorScheme: "dark"
  });
  const lightParsed = parseThemeColor.parseThemeColor({
    color: color || theme.primaryColor,
    theme,
    colorScheme: "light"
  });
  return {
    root: {
      "--bq-bg-light": rgba.rgba(lightParsed.value, 0.07),
      "--bq-bg-dark": rgba.rgba(darkParsed.value, 0.06),
      "--bq-bd": getThemeColor.getThemeColor(color, theme),
      "--bq-icon-size": rem.rem(iconSize),
      "--bq-radius": getSize.getRadius(radius)
    }
  };
});
const Blockquote = factory.factory((_props, ref) => {
  const props = useProps.useProps("Blockquote", defaultProps, _props);
  const {
    classNames,
    className,
    style,
    styles,
    unstyled,
    vars,
    children,
    icon,
    iconSize,
    cite,
    ...others
  } = props;
  const getStyles = useStyles.useStyles({
    name: "Blockquote",
    classes: Blockquote_module_css.default,
    props,
    className,
    style,
    classNames,
    styles,
    unstyled,
    vars,
    varsResolver
  });
  return /* @__PURE__ */ jsxRuntime.jsxs(Box.Box, { component: "blockquote", ref, ...getStyles("root"), ...others, children: [
    icon && /* @__PURE__ */ jsxRuntime.jsx("span", { ...getStyles("icon"), children: icon }),
    children,
    cite && /* @__PURE__ */ jsxRuntime.jsx("cite", { ...getStyles("cite"), children: cite })
  ] });
});
Blockquote.classes = Blockquote_module_css.default;
Blockquote.displayName = "@mantine/core/Blockquote";
exports.Blockquote = Blockquote;
