<template>
  <w-grid
    :title="$t('io.sc.engine.mv.config.binomial.grid.title')"
    :config-button="true"
    selection="multiple"
    :checkbox-selection="true"
    :data-url="Environment.apiContextPath('/api/mv/config/binomial')"
    :pageable="false"
    :toolbar-configure="{ noIcon: false }"
    :toolbar-actions="['refresh', 'separator', 'add', 'edit', 'remove', 'separator', 'resetDefaultValues', 'separator', 'view', 'separator', 'export']"
    :columns="[
      { width: 100, name: 'significanceLevel', label: $t('io.sc.engine.mv.config.binomial.grid.entity.significanceLevel') },
      { width: 100, name: 'confidenceLevel', label: $t('io.sc.engine.mv.config.binomial.grid.entity.confidenceLevel') },
      { width: 120, name: 'zUpper', label: $t('io.sc.engine.mv.config.binomial.grid.entity.zUpper') },
      { width: 120, name: 'zLower', label: $t('io.sc.engine.mv.config.binomial.grid.entity.zLower') },
      { width: 100, name: 'lastModifier', label: $t('lastModifier') },
      { width: 150, name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.dateOnly() },
    ]"
    :editor="{
      dialog: {
        width: '600px',
        height: '300px',
      },
      form: {
        colsNum: 1,
        fields: [
          { name: 'significanceLevel', label: $t('io.sc.engine.mv.config.binomial.grid.entity.significanceLevel'), type: 'text' },
          { name: 'confidenceLevel', label: $t('io.sc.engine.mv.config.binomial.grid.entity.confidenceLevel'), type: 'text' },
          { name: 'zUpper', label: $t('io.sc.engine.mv.config.binomial.grid.entity.zUpper'), type: 'text' },
          { name: 'zLower', label: $t('io.sc.engine.mv.config.binomial.grid.entity.zLower'), type: 'text' },
        ],
      },
    }"
    :viewer="{
      panel: {
        columnNum: 1,
        fields: [
          { name: 'id', label: $t('id') },
          { name: 'significanceLevel', label: $t('io.sc.engine.mv.config.binomial.grid.entity.significanceLevel') },
          { name: 'confidenceLevel', label: $t('io.sc.engine.mv.config.binomial.grid.entity.confidenceLevel') },
          { name: 'zUpper', label: $t('io.sc.engine.mv.config.binomial.grid.entity.zUpper') },
          { name: 'zLower', label: $t('io.sc.engine.mv.config.binomial.grid.entity.zLower') },
          { name: 'creator', label: $t('creator') },
          { name: 'createDate', label: $t('createDate') },
          { name: 'lastModifier', label: $t('lastModifier') },
          { name: 'lastModifyDate', label: $t('lastModifyDate') },
        ],
      },
    }"
  ></w-grid>
</template>
<script setup lang="ts">
import { Environment, Formater } from 'platform-core';
</script>
