<script>

import { mapActions, mapState } from 'pinia'
import { StaticsStore } from '@/stores/statics'


export default {
  props: ['id'],
  // data(){
  //   return {
  //     block: null
  //   }
  // },
  computed: {
    ...mapState(StaticsStore,['loaded', 'statics_byid'])
  },
  created () {
    console.log("static created, id", this.id);
    // this.loadStatics()
  },
  methods: {
    ...mapActions(StaticsStore,['loadStatics'])
  },
  components: {
    // MapConcernements
  }
}

</script>

<template>
  <span v-if="!loaded">loading ...</span>
  <!-- <h2 v-if="loaded">{{ this.id }}</h2> -->
  <h2 v-if="loaded">{{ statics_byid[id].title }}</h2>
  <div v-if="loaded" v-html="statics_byid[id].texte"/>
</template>

<style lang="scss" scoped>

</style>
