<template>
  <w-grid
    :title="$t('menu.developer.plugin.applicationProperties')"
    :toolbar-actions="['refresh', 'separator', 'view', 'export']"
    :fetch-data-url="Environment.apiContextPath('/api/developer/plugins/applicationProperties')"
    :checkbox-selection="false"
    :pageable="false"
    :columns="[
      { width: 50, name: 'order', label: $t('order'), align: 'right', sortable: false },
      { width: 150, name: 'module', label: $t('module'), sortable: false },
      { width: 200, name: 'description', label: $t('description'), sortable: false },
      {
        width: 300,
        name: 'properties',
        label: $t('properties'),
        sortable: false,
        format: (properties) => {
          properties = properties || [];
          let result = '';
          for (const property of properties) {
            result += property + '<br/>';
          }
          return result;
        },
      },
      { width: 200, name: 'configurationFileUrl', label: $t('url') },
    ]"
  ></w-grid>
</template>
<script setup lang="ts">
import { Environment } from 'platform-core';
</script>
