import { jsxs as t, Fragment as r, jsx as c } from "react/jsx-runtime";
import o from "../../utils/classNames.js";
const L = (h) => {
  const {
    spacing: m = 15,
    dividerWidth: p = 1,
    dividerColor: v = "light",
    asSpacer: f = !1,
    vertical: i = !1,
    titleAlignment: n = "center",
    className: x = "",
    children: s
  } = h, N = o("Divider", "position-relative", !i && "width-100pct", x), l = `${m}px`, e = {};
  i && (e.paddingLeft = l, e.paddingRight = l), i || (e.paddingTop = l, e.paddingBottom = l);
  const y = o("divider-line", `bg-${v}`), $ = typeof s == "string", g = /* @__PURE__ */ c(
    "div",
    {
      className: y,
      style: {
        width: i ? `${p}px` : "100%",
        height: i ? "100%" : `${p}px`
      }
    }
  ), d = /* @__PURE__ */ c("div", { className: "flex-1-0", children: g }), a = /* @__PURE__ */ c("div", { className: $ ? "padding-x-10" : "", children: s }), u = o("divider-title", "display-flex", "align-items-center");
  return /* @__PURE__ */ t("div", { className: N, style: e, children: [
    !f && !s && g,
    s && /* @__PURE__ */ t("div", { className: u, children: [
      n === "left" && /* @__PURE__ */ t(r, { children: [
        a,
        d
      ] }),
      n === "center" && /* @__PURE__ */ t(r, { children: [
        d,
        a,
        d
      ] }),
      n === "right" && /* @__PURE__ */ t(r, { children: [
        d,
        a
      ] })
    ] })
  ] });
};
export {
  L as default
};
//# sourceMappingURL=Divider.js.map
