import { jsx } from "react/jsx-runtime";
import { cx } from "@emotion/css";
import { useStyle } from "../../../../use-style";
import { Link } from "../../../../../../components/shared/Link";
import { InlineType } from "../../../../../../slate/types";
function StyledLink({ className, ...restOfProps }) {
  return /* @__PURE__ */ jsx(Link, { ...restOfProps, className: cx(useStyle({ textDecoration: "none" }), className) });
}
function InlineElement({ element, attributes, children }) {
  switch (element.type) {
    case InlineType.Code:
      return /* @__PURE__ */ jsx("code", { ...attributes, children });
    case InlineType.SuperScript:
      return /* @__PURE__ */ jsx("sup", { ...attributes, children });
    case InlineType.SubScript:
      return /* @__PURE__ */ jsx("sub", { ...attributes, children });
    case InlineType.Link:
      return /* @__PURE__ */ jsx(StyledLink, { ...attributes, link: element.link ?? void 0, children });
  }
}
export {
  InlineElement
};
//# sourceMappingURL=inline.js.map