import { defineComponent as v, computed as c, createVNode as y } from "vue";
const b = {
  direction: {
    type: String,
    default: "horizontal"
  },
  color: {
    type: String,
    default: ""
  },
  borderStyle: {
    type: String,
    default: "solid"
  },
  contentPosition: {
    type: String,
    default: "center"
  },
  contentColor: {
    type: String,
    default: ""
  },
  contentBackgroundColor: {
    type: String,
    default: ""
  }
};
const f = "g";
function l(t, n, e) {
  let r = t;
  return n && (r += `__${n}`), e && (r += `--${e}`), r;
}
function S(t, n = !1) {
  const e = n ? `.${f}-${t}` : `${f}-${t}`;
  return {
    b: () => l(e),
    e: (o) => o ? l(e, o) : "",
    m: (o) => o ? l(e, "", o) : "",
    em: (o, u) => o && u ? l(e, o, u) : ""
  };
}
const g = "G", i = /* @__PURE__ */ v({
  name: `${g}Divider`,
  props: b,
  setup(t, {
    slots: n
  }) {
    const e = S("divider"), r = c(() => ({
      ...t.direction !== "horizontal" ? {
        "border-left-style": t.borderStyle
      } : {
        "border-top-style": t.borderStyle
      },
      "border-color": t.color
    })), d = c(() => t.direction === "horizontal" ? e.b() : e.m("vertical")), a = c(() => ({
      color: t.contentColor,
      "background-color": t.contentBackgroundColor
    })), s = c(() => `${e.e("text")} is-${t.contentPosition}`);
    return () => y("div", {
      class: d.value,
      style: r.value
    }, [y("div", {
      class: s.value,
      style: a.value
    }, [n.default && n.default()])]);
  }
});
i.install = function(t, n) {
  t.component(n || i.name, i);
};
const $ = {
  title: "Divider 分割线",
  category: "布局",
  status: "100%",
  install(t) {
    t.component(i.name, i);
  }
};
export {
  i as Divider,
  $ as default
};
