{"version":3,"file":"Title-DpJvDqV1.mjs","names":[],"sources":["../src/components/templates/Title.vue"],"sourcesContent":["<template>\n  <component :is=\"tagName\" :class=\"classes\">\n     <component\n      v-for=\"(c, index) in children\"\n      :key=\"'title_component_' + index\"\n      :is=\"c.component\"\n      :node=\"c.node\"\n      :componentName=\"c.name\"\n      :properties=\"c.properties\"\n    />\n </component>\n</template>\n<script setup>\nimport { computed, toRefs } from 'vue'\n\nimport { useChildren } from '../../composables/computed'\n\nconst props = defineProps({\n  node: {\n    type: undefined,\n    default: null,\n  },\n  componentName: {\n    type: String,\n  },\n  properties: {\n    type: Object,\n    required: true,\n  },\n})\n\nconst { node, properties } = toRefs(props)\n\nconst { children } = useChildren(node)\n\nconst depth = properties.value.depth\nconst isTopic = properties.value.isTopic\n\nconst tagName = computed(() => {\n  let tagName = 'h' + depth\n  if (isTopic) {\n    tagName = 'p'\n  }\n  return tagName\n})\n\nconst classes = computed(() => {\n  let classes = []\n  if (isTopic) {\n    classes.push('topic-title')\n    if (depth === 1) {\n      classes.push('first')\n    }\n  }\n  return classes\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;EA+BA,IAAM,EAAE,SAAM,kBAAe,EAAO,CAAK,GAEnC,EAAE,gBAAa,EAAY,CAAI,GAE/B,IAAQ,EAAW,MAAM,OACzB,IAAU,EAAW,MAAM,SAE3B,IAAU,QAAe;GAC7B,IAAI,IAAU,MAAM;GAIpB,OAHI,MACF,IAAU,MAEL;EACT,CAAC,GAEK,IAAU,QAAe;GAC7B,IAAI,IAAU,CAAC;GAOf,OANI,MACF,EAAQ,KAAK,aAAa,GACtB,MAAU,KACZ,EAAQ,KAAK,OAAO,IAGjB;EACT,CAAC;oBAtDC,EAAA,GAAA,EASW,EATK,EAAA,KAAO,GAAA,EAAG,OAAK,EAAE,EAAA,KAAO,EAAA,GAAA;GAEpC,SAAA,QAA8B,EAD/B,EAAA,EAAA,GAAA,EAOC,GAAA,MAAA,EANqB,EAAA,CAAA,IAAb,GAAG,OADZ,EAAA,GAAA,EAOC,EAJK,EAAE,SAAS,GAAA;IADf,KAAG,qBAAuB;IAE1B,MAAM,EAAE;IACR,eAAe,EAAE;IACjB,YAAY,EAAE"}