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 "../../../../@ant-design/cssinjs/es/theme/createTheme.mjs";
import "../../../../rc-util/es/warning.mjs";
import "../../../../@ant-design/cssinjs/es/theme/ThemeCache.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 "../../../../@ant-design/cssinjs/es/transformers/legacyLogicalProperties.mjs";
import { genStyleHooks as e } from "../../theme/util/genComponentStyleHook.mjs";
import { getTitleStyles as i, getResetStyles as s, getLinkStyles as l, getEditableStyles as c, getCopyableStyles as a, getEllipsisStyles as p } from "./mixins.mjs";
import { operationUnit as g } from "../../style/operationUnit.mjs";
const n = (r) => {
  const {
    componentCls: o,
    titleMarginTop: t
  } = r;
  return {
    [o]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
      color: r.colorText,
      wordBreak: "break-word",
      lineHeight: r.lineHeight,
      [`&${o}-secondary`]: {
        color: r.colorTextDescription
      },
      [`&${o}-success`]: {
        color: r.colorSuccess
      },
      [`&${o}-warning`]: {
        color: r.colorWarning
      },
      [`&${o}-danger`]: {
        color: r.colorError,
        "a&:active, a&:focus": {
          color: r.colorErrorActive
        },
        "a&:hover": {
          color: r.colorErrorHover
        }
      },
      [`&${o}-disabled`]: {
        color: r.colorTextDisabled,
        cursor: "not-allowed",
        userSelect: "none"
      },
      "\n        div&,\n        p\n      ": {
        marginBottom: "1em"
      }
    }, i(r)), {
      [`
      & + h1${o},
      & + h2${o},
      & + h3${o},
      & + h4${o},
      & + h5${o}
      `]: {
        marginTop: t
      },
      "\n      div,\n      ul,\n      li,\n      p,\n      h1,\n      h2,\n      h3,\n      h4,\n      h5": {
        "\n        + h1,\n        + h2,\n        + h3,\n        + h4,\n        + h5\n        ": {
          marginTop: t
        }
      }
    }), s(r)), l(r)), {
      // Operation
      [`
        ${o}-expand,
        ${o}-edit,
        ${o}-copy
      `]: Object.assign(Object.assign({}, g(r)), {
        marginInlineStart: r.marginXXS
      })
    }), c(r)), a(r)), p()), {
      "&-rtl": {
        direction: "rtl"
      }
    })
  };
}, m = () => ({
  titleMarginTop: "1.2em",
  titleMarginBottom: "0.5em"
}), w = e("Typography", (r) => [n(r)], m);
export {
  w as default,
  m as prepareComponentToken
};
