<script setup lang="ts">
import PageHeaderTemplate from 'src/modules/shared/components/page-header-template.vue';
import HelpModule from 'src/modules/help/components/help-module.vue';
import { onMounted } from 'vue';
import { useHelpStore } from 'src/stores/help-store';

const help_store = useHelpStore();
onMounted(async () => {
    await help_store.getHelpModules();
});
</script>

<template>
    <q-page
        flat
        class="bg-secondary q-px-xl column no-wrap"
    >
        <div class="col q-px-xl">
            <PageHeaderTemplate
                :title="$t('help.label')"
                class="text-accent"
            />
            <help-module
                v-for="(options, help_module, index) in help_store.help_module_filters"
                :key="help_module"
                :help_module="help_module"
                :module-index="index"
                :options="options"
            />
        </div>
    </q-page>
</template>