<template>
  <div class="help-center-subsection">
    <help-center-card
      v-for="item in qaList"
      :key="item.title"
      :content="item.content"
      :title="item.title"
      :type="type"
      class="Hc-subsection-card"
    ></help-center-card>
  </div>
</template>
<script>
import QA from "@/api/helpCenter";
import HelpCenterCard from "../modules/HelpCenterCard";

export default {
  name: "Subsection",
  components: {
    HelpCenterCard
  },
  data() {
    return {
      type: {},
      qaList: {}
    };
  },
  created() {
    this.type = this.$route.params.type;
    this.qaList = Object.keys(QA[this.type]).map(v => ({
      title: v,
      content: QA[this.type][v]
    }));
  }
};
</script>
<style lang="less" src="./index.less" scoped></style>
