import { createElementBlock as l, openBlock as n, Fragment as f, createElementVNode as p, createCommentVNode as o, normalizeStyle as d, unref as e, toDisplayString as g, renderSlot as r } from "vue";
import { u as c } from "./useNestedProp-BXHzK3EV.js";
const x = {
  __name: "Title",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    lineHeight: {
      type: [String, Boolean],
      default: !1
    }
  },
  setup(i) {
    const t = c({
      userConfig: i.config,
      defaultConfig: {
        title: {
          cy: "",
          text: "",
          color: "",
          fontSize: 20,
          bold: !0,
          textAlign: "center",
          paddingLeft: 0,
          paddingRight: 0
        },
        subtitle: {
          cy: "",
          text: "",
          color: "",
          fontSize: 14,
          bold: !1
        }
      }
    });
    return (a, h) => (n(), l(f, null, [
      p("div", {
        class: "atom-title",
        style: d(`width: calc(100% - ${e(t).title.paddingLeft + e(t).title.paddingRight}px); text-align:${e(t).title.textAlign};color:${e(t).title.color};font-size:${e(t).title.fontSize}px;font-weight:${e(t).title.bold ? "bold" : ""};padding-left:${e(t).title.paddingLeft}px;padding-right:${e(t).title.paddingRight}px;${i.lineHeight ? `line-height:${i.lineHeight}` : ""}`)
      }, g(e(t).title.text), 5),
      e(t).subtitle.text ? (n(), l("div", {
        key: 0,
        class: "atom-subtitle",
        style: d(`width: calc(100% - ${e(t).title.paddingLeft + e(t).title.paddingRight}px); text-align:${e(t).title.textAlign};color:${e(t).subtitle.color};font-size:${e(t).subtitle.fontSize}px;font-weight:${e(t).subtitle.bold ? "bold" : ""};padding-left:${e(t).title.paddingLeft}px;padding-right:${e(t).title.paddingRight}px;${i.lineHeight ? `line-height:${i.lineHeight}` : ""}`)
      }, g(e(t).subtitle.text), 5)) : o("", !0),
      e(t).subtitle.text ? (n(), l("div", {
        key: 1,
        style: d(`width: calc(100% - ${e(t).title.paddingLeft + e(t).title.paddingRight}px); text-align:${e(t).title.textAlign};color:${e(t).subtitle.color};font-size:${e(t).subtitle.fontSize}px;font-weight:${e(t).subtitle.bold ? "bold" : ""};padding-left:${e(t).title.paddingLeft}px;padding-right:${e(t).title.paddingRight}px;${i.lineHeight ? `line-height:${i.lineHeight}` : ""}`)
      }, [
        r(a.$slots, "default")
      ], 4)) : o("", !0)
    ], 64));
  }
};
export {
  x as _
};
