import {
  chakra,
  mergeThemeOverride,
  useStyleConfig
} from "/build/_shared/chunk-HFAAAKQN.js";
import {
  require_react
} from "/build/_shared/chunk-CJ4MY3PQ.js";
import {
  __toESM
} from "/build/_shared/chunk-PZDJHGND.js";

// node_modules/@nikolovlazar/chakra-ui-prose/dist/index.mjs
var React = __toESM(require_react(), 1);
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
  for (var prop in b || (b = {}))
    if (__hasOwnProp.call(b, prop))
      __defNormalProp(a, prop, b[prop]);
  if (__getOwnPropSymbols)
    for (var prop of __getOwnPropSymbols(b)) {
      if (__propIsEnum.call(b, prop))
        __defNormalProp(a, prop, b[prop]);
    }
  return a;
};
var __objRest = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols)
    for (var prop of __getOwnPropSymbols(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
function Prose(props) {
  const _a = props, { children, as = "article" } = _a, rest = __objRest(_a, ["children", "as"]);
  const styles = useStyleConfig("Prose", __spreadValues({}, props));
  return /* @__PURE__ */ React.createElement(chakra.div, __spreadValues({
    as,
    __css: __spreadValues({}, styles)
  }, rest), children);
}
var baseStyle = () => ({
  h1: {
    fontFamily: "heading",
    fontWeight: "bold",
    fontSize: { base: "4xl", md: "5xl" },
    mb: { base: 8, md: 10 }
  },
  h2: {
    fontFamily: "heading",
    fontWeight: "bold",
    fontSize: { base: "2xl", md: "3xl" },
    mt: { base: 12, md: 14 },
    mb: { base: 6, md: 8 }
  },
  h3: {
    fontFamily: "heading",
    fontWeight: "semibold",
    fontSize: { base: "xl", md: "2xl" },
    mt: { base: 8, md: 10 },
    mb: { base: 3, md: 4 }
  },
  h4: {
    fontFamily: "heading",
    fontWeight: "semibold",
    fontSize: { base: "md", md: "lg" },
    mt: { base: 6, md: 8 },
    mb: 2
  },
  p: {
    fontFamily: "body",
    fontWeight: "normal",
    fontSize: "md",
    lineHeight: 6,
    my: 6
  },
  a: {
    fontWeight: 500,
    transitionProperty: "common",
    transitionDuration: "fast",
    transitionTimingFunction: "ease-out",
    cursor: "pointer",
    textDecoration: "none",
    outline: "none",
    color: "inherit",
    _hover: {
      textDecoration: "underline"
    },
    _focus: {
      boxShadow: "outline"
    }
  },
  hr: {
    my: { base: 12, md: 14 },
    borderColor: "gray.200",
    _dark: {
      borderColor: "gray.600"
    }
  },
  blockquote: {
    fontStyle: "italic",
    fontWeight: "semibold",
    paddingStart: 4,
    my: { base: 6, md: 8 },
    borderStartWidth: "4px",
    borderStartColor: "gray.200",
    _dark: {
      borderStartColor: "gray.600"
    }
  },
  pre: {
    p: 4,
    rounded: "md",
    bg: "gray.700",
    color: "gray.50",
    overflow: "auto",
    _dark: {
      bg: "gray.800"
    },
    code: {
      fontWeight: "normal",
      "&::before, &::after": {
        content: '""'
      }
    }
  },
  code: {
    fontWeight: "semibold",
    "&::before, &::after": {
      content: '"`"'
    }
  },
  figure: {
    my: 8,
    figcaption: {
      color: "gray.400",
      mt: 3,
      _dark: {
        color: "gray.500"
      }
    }
  },
  ul: {
    paddingStart: 6,
    listStyleType: "disc"
  },
  ol: {
    paddingStart: 6
  },
  li: {
    paddingStart: 2,
    my: 3
  },
  "ol>li::marker": {
    color: "gray.400",
    _dark: {
      color: "gray.500"
    }
  },
  "ul>li::marker": {
    color: "gray.500",
    _dark: {
      color: "gray.300"
    }
  },
  table: {
    width: "full",
    my: 8,
    textAlign: "start",
    thead: {
      borderBottomWidth: "1px",
      borderBottomColor: "gray.300",
      _dark: {
        borderBottomColor: "gray.600"
      }
    },
    th: {
      textAlign: "inherit",
      fontWeight: 600,
      p: { base: 2, md: 3 }
    },
    td: {
      p: { base: 2, md: 3 },
      verticalAlign: "baseline"
    },
    tbody: {
      tr: {
        borderBottomWidth: "1px",
        borderBottomColor: "gray.200",
        _dark: {
          borderBottomColor: "gray.700"
        },
        ":last-of-type": {
          borderBottomWidth: "0px",
          borderBottomColor: "transparent"
        }
      }
    },
    tfoot: {
      tr: {
        borderTopWidth: "1px",
        borderTopColor: "gray.300",
        _dark: {
          borderTopColor: "gray.600"
        }
      }
    }
  },
  "h1 + *, h2 + *, h3 + *, h4 + *, hr + *": {
    mt: 0
  }
});
var proseTheme = {
  baseStyle
};
function withProse(themeOverride) {
  return (theme) => {
    const overridenProseTheme = mergeThemeOverride(proseTheme, themeOverride);
    return mergeThemeOverride(theme, {
      components: {
        Prose: overridenProseTheme
      }
    });
  };
}

export {
  Prose,
  withProse
};
//# sourceMappingURL=/build/_shared/chunk-BKVOTC2X.js.map
