import { openBlock as i, createElementBlock as l, Fragment as a, createElementVNode as r, normalizeStyle as d, unref as e, toDisplayString as n, createCommentVNode as o, renderSlot as f } from "vue";
import { u as s } from "./useNestedProp-BbEbJmgv.js";
const b = {
  __name: "Title",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    }
  },
  setup(g) {
    const t = s({
      userConfig: g.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 (p, x) => (i(), l(a, null, [
      r("div", {
        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;`)
      }, n(e(t).title.text), 5),
      e(t).subtitle.text ? (i(), l("div", {
        key: 0,
        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;`)
      }, n(e(t).subtitle.text), 5)) : o("", !0),
      e(t).subtitle.text ? (i(), 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;`)
      }, [
        f(p.$slots, "default")
      ], 4)) : o("", !0)
    ], 64));
  }
};
export {
  b as _
};
