import { a3 as h, aD as b, aE as m, X as g, cG as c, V as x, w as u, a5 as n, cH as p, aG as v, c3 as f, U as w, H as a, ad as l, I as d, ae as i, af as r, a4 as o, am as s, ag as S, _ as C, aj as y, ai as W, aH as V, cI as D } from "./56c67d3b.js";
import { useContext as $ } from "react";
import "react-dom";
const H = h(D)`
 
  margin-top: 3.5px;
  rotate: ${(t) => t.type === "vertical" ? "0deg" : t.$style.rotation};
  .ant-divider-inner-text {
    height: 32px;
    display: flex;
    align-items: center;
    font-size: ${(t) => t.$style.textSize};
    font-weight: ${(t) => t.$style.textWeight};
    font-family: ${(t) => t.$style.fontFamily};
    text-transform: ${(t) => t.$style.textTransform};
    ${(t) => t.$style.textDecoration !== void 0 ? `text-decoration: ${t.$style.textDecoration};` : ""}
    font-style: ${(t) => t.$style.fontStyle};
  }

  ${(t) => t.$animationStyle}
  min-width: 1px;
  width: ${(t) => b(t.$style.margin)};
  min-height: ${(t) => m(t.$style.margin)};
  margin: ${(t) => t.$style.margin};
  padding: ${(t) => t.$style.padding};
  border-radius: ${(t) => t.$style.radius};
  border-top: ${(t) => t.$style.borderWidth && t.$style.borderWidth !== "0px" ? t.$style.borderWidth : "1px"} 
              ${(t) => t.$style.borderStyle} 
              ${(t) => t.$style.border};

  .ant-divider-inner-text::before,
  .ant-divider-inner-text::after {
    border-block-start: ${(t) => t.$style.borderWidth && t.$style.borderWidth !== "0px" ? t.$style.borderWidth : "1px"} 
                      ${(t) => t.$style.border} !important;
    border-block-start-color: inherit;
    border-block-end: 0;
    border-block-start-radius: inherit;
  }

  &.ant-divider-horizontal.ant-divider-with-text {
    margin: 0;
    border-top-color: ${(t) => t.$style.color};
    color: ${(t) => t.$style.text};
  }

  &.ant-divider-horizontal.ant-divider-with-text::before,
  &.ant-divider-horizontal.ant-divider-with-text::after {
    border-top-color: ${(t) => t.$style.color};
    border-radius: ${(t) => t.$style.radius};
    border-top: ${(t) => t.$style.borderWidth && t.$style.borderWidth !== "0px" ? t.$style.borderWidth : "1px"} 
               ${(t) => t.$style.borderStyle} 
               ${(t) => t.$style.border};
  }
  &.ant-divider-vertical {
    height:  ${(t) => t.type === "vertical" && "200px"}; 
    border-left: ${(t) => t.$style.borderWidth && t.$style.borderWidth !== "0px" ? t.$style.borderWidth : "1px"} 
                ${(t) => t.$style.borderStyle} 
                ${(t) => t.$style.border};
    border-top: none;
  }
`, z = {
  title: g,
  align: c(),
  type: x,
  autoHeight: u(V, "auto"),
  style: n(p, "style"),
  animationStyle: n(v, "animationStyle")
};
function P(t) {
  return t && t.hasOwnProperty("color") ? {
    ...t,
    style: {
      color: t.color,
      text: ""
    }
  } : t;
}
const k = f(new w(z, (t) => {
  const e = t.type ? "vertical" : "horizontal";
  return /* @__PURE__ */ a(H, {
    orientation: t.align,
    type: e,
    $style: t.style,
    $animationStyle: t.animationStyle,
    children: e === "horizontal" && t.title
  });
}).setPropertyViewFn((t) => {
  var e;
  return /* @__PURE__ */ l(d, {
    children: [!((e = t == null ? void 0 : t.type) != null && e.getView()) && /* @__PURE__ */ a(i, {
      name: r.basic,
      children: t.title.propertyView({
        label: o("divider.title")
      })
    }), ["logic", "both"].includes($(s).editorModeStatus) && /* @__PURE__ */ a(i, {
      name: r.interaction,
      children: S(t)
    }), ["layout", "both"].includes($(s).editorModeStatus) && /* @__PURE__ */ l(d, {
      children: [/* @__PURE__ */ l(i, {
        name: r.layout,
        children: [!C.isEmpty(t.title.getView()) && t.align.propertyView({
          label: o("divider.align"),
          radioButton: !0
        }), t.autoHeight.getPropertyView()]
      }), /* @__PURE__ */ l(i, {
        name: r.style,
        children: [t.type.propertyView({
          label: o("divider.type")
        }), t.style.getPropertyView()]
      }), /* @__PURE__ */ a(i, {
        name: r.animationStyle,
        hasTooltip: !0,
        children: t.animationStyle.getPropertyView()
      })]
    })]
  });
}).setExposeStateConfigs([new y("title", o("divider.titleDesc")), new y("align", o("divider.alignDesc")), W]).build(), P), B = class extends k {
  autoHeight() {
    return this.children.autoHeight.getView();
  }
};
export {
  B as DividerComp
};
