var a = Object.defineProperty;
var i = (s, t, e) => t in s ? a(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
var l = (s, t, e) => i(s, typeof t != "symbol" ? t + "" : t, e);
import { jsx as u } from "react/jsx-runtime";
import { createPluginFactory as c } from "@udecode/plate-core";
import { merge as p } from "../../../../../utilities/merge.es.js";
import { alignmentClassnames as g } from "../../helper.es.js";
import { TextStyles as m } from "../types.es.js";
import { Plugin as f } from "../../Plugin.es.js";
import { defaultStyles as y } from "../../../utils/defaultStyles.es.js";
import { MarkupElement as C } from "../../MarkupElement.es.js";
import { getColumnBreakClasses as d } from "../../ColumnBreakPlugin/utils/getColumnBreakClasses.es.js";
const k = "textstyle-custom1-plugin";
class B extends f {
  constructor({ styles: e = y.custom1, ...o } = {}) {
    super(m.custom1, {
      label: "Custom 1",
      markupElement: new x(),
      ...o
    });
    l(this, "styles", {});
    this.styles = e;
  }
  plugins() {
    return [E(this.styles)];
  }
}
class x extends C {
  constructor(t = k, e = n) {
    super(t, e);
  }
}
const n = ({ element: s, attributes: t, children: e, styles: o }) => {
  const r = s.align;
  return /* @__PURE__ */ u(
    "p",
    {
      ...t,
      className: p([r && g[r], d(s)]),
      style: o,
      children: e
    }
  );
}, E = (s) => c({
  key: m.custom1,
  isElement: !0,
  deserializeHtml: {
    rules: [{ validClassName: m.custom1 }]
  }
})({
  component: (t) => /* @__PURE__ */ u(n, { ...t, styles: s })
});
export {
  B as Custom1Plugin
};
//# sourceMappingURL=custom1Plugin.es.js.map
