<template>
    <div>
        <DxDataGrid class="max-h-[calc(100vh-140px)]" :show-column-lines="true" :show-row-lines="false" :show-borders="true"
            :row-alternation-enabled="true" :hover-state-enabled="true" @selection-changed="" :column-width="100"
            @exporting="" :allow-column-resizing="true" column-resizing-mode="widget">
            <DxSelection mode="single" />
            <DxPaging :page-size="5" :enabled="true" />
            <DxPager :visible="true" :allowed-page-sizes="[5, 10, 20, 'all']" display-mode="full"
                :show-page-size-selector="true" :show-info="true" :show-navigation-buttons="true" />
            <DxLoadPanel :enabled="true" />
            <DxSearchPanel :visible="true" :highlight-case-sensitive="true" />
            <DxExport :enabled="true" :formats="['pdf', 'xlsx', 'document']" :allow-export-selected-data="false" />

            <DxColumn css-class="custom-table-column" :width="50" alignment="center" data-field="" data-type="number"
                caption="No" />
            <DxColumn css-class="custom-table-column" :width="170" alignment="center" data-field=""
                caption="Nomor Gangguan" />
            <DxColumn css-class="custom-table-column" :width="170" alignment="center" data-field=""
                caption="Nama Pelanggan" />
            <DxColumn css-class="custom-table-column" :width="170" alignment="center" data-field="" caption="Isi Laporan" />
            <DxColumn css-class="custom-table-column" :width="170" alignment="center" data-field=""
                caption="Penyebab Gangguan" />
            <DxColumn css-class="custom-table-column" :width="170" alignment="center" data-field="" caption="Tgl Padam" />
            <DxColumn css-class="custom-table-column" :width="170" alignment="center" data-field="" caption="Tgl Nyala" />
            <DxColumn css-class="custom-table-column" :width="170" alignment="center" data-field="" caption="Regu" />
            <DxColumn css-class="custom-table-column" alignment="center" caption="Material Yang Dipakai">
                <DxColumn css-class="custom-table-column" :width="170" alignment="center" data-field="" caption="Sumber" />
                <DxColumn css-class="custom-table-column" :width="170" alignment="center" data-field="" caption="Nama" />
                <DxColumn css-class="custom-table-column" :width="170" alignment="center" data-field="" caption="Satuan" />
                <DxColumn css-class="custom-table-column" :width="170" alignment="center" data-field="" caption="Vol" />
            </DxColumn>

        </DxDataGrid>
    </div>
</template>

<script setup lang="ts">
import { onMounted } from 'vue'
import { useFiltersStore } from '@/stores/filters'
import { DxDataGrid } from 'devextreme-vue'
import { DxColumn, DxExport, DxLoadPanel, DxPager, DxPaging, DxScrolling, DxSearchPanel, DxSelection } from 'devextreme-vue/data-grid'

onMounted(() => {
    const filters = useFiltersStore()

    filters.setConfig({
        type: 'type-14'
    })
})
</script>