import "../../../../@ant-design/cssinjs/es/extractStyle.mjs";
import "../../../../@ant-design/cssinjs/es/hooks/useCacheToken.mjs";
import "react";
import "../../../../@ant-design/cssinjs/es/StyleContext.mjs";
import { unit as n } from "../../../../@ant-design/cssinjs/es/util/index.mjs";
import "../../../../@ant-design/cssinjs/es/hooks/useCompatibleInsertionEffect.mjs";
import "../../../../@ant-design/cssinjs/es/hooks/useEffectCleanupRegister.mjs";
import "../../../../@ant-design/cssinjs/es/hooks/useHMR.mjs";
import "../../../../rc-util/es/warning.mjs";
import "../../../../@ant-design/cssinjs/es/theme/createTheme.mjs";
import "../../../../@ant-design/cssinjs/es/theme/ThemeCache.mjs";
import "../../../../@ant-design/cssinjs/es/transformers/legacyLogicalProperties.mjs";
import { resetComponent as l } from "../../style/index.mjs";
import { genStyleHooks as d } from "../../theme/util/genComponentStyleHook.mjs";
import { merge as s } from "../../theme/util/statistic.mjs";
const a = (o) => {
  const {
    componentCls: e,
    lineWidth: r,
    lineType: t,
    colorSplit: i
  } = o;
  return {
    [e]: Object.assign(Object.assign({}, l(o)), {
      display: "flex",
      justifyContent: "center",
      alignItems: "center",
      padding: o.paddingSM,
      backgroundColor: o.colorWhite,
      borderRadius: o.borderRadiusLG,
      border: `${n(r)} ${t} ${i}`,
      position: "relative",
      overflow: "hidden",
      [`& > ${e}-mask`]: {
        position: "absolute",
        insetBlockStart: 0,
        insetInlineStart: 0,
        zIndex: 10,
        display: "flex",
        flexDirection: "column",
        justifyContent: "center",
        alignItems: "center",
        width: "100%",
        height: "100%",
        color: o.colorText,
        lineHeight: o.lineHeight,
        background: o.QRCodeMaskBackgroundColor,
        textAlign: "center",
        [`& > ${e}-expired`]: {
          color: o.QRCodeExpiredTextColor
        }
      },
      "> canvas": {
        alignSelf: "stretch",
        flex: "auto",
        minWidth: 0
      },
      "&-icon": {
        marginBlockEnd: o.marginXS,
        fontSize: o.controlHeight
      }
    }),
    [`${e}-borderless`]: {
      borderColor: "transparent"
    }
  };
}, p = () => ({}), j = d("QRCode", (o) => {
  const e = s(o, {
    QRCodeExpiredTextColor: "rgba(0, 0, 0, 0.88)",
    QRCodeMaskBackgroundColor: "rgba(255, 255, 255, 0.96)"
  });
  return a(e);
}, p);
export {
  j as default,
  p as prepareComponentToken
};
