<script setup>
import {NDatePicker} from 'naive-ui'
import {storeToRefs} from "pinia";
import {useReportStore} from "../Stores/report.js";

const themeOverride = {
    peers: {
        Input: {
            border: null,
            color: null,
            colorFocus: null,
            borderHover: null,
            borderFocus: null,
            boxShadowFocus: null,
            paddingMedium: ''
        }
    }
}

const reportStore = useReportStore()
const { timestampCurrentRange } = storeToRefs(reportStore)
</script>

<template>
    <NDatePicker :theme-overrides="themeOverride"
                 v-model:value="reportStore.timestampCurrentRange"
                 format="dd.MM.YYYY"
                 type="daterange"
                 @update-value="value => reportStore.getDataOnReportDate(value)"
    />
</template>

<style scoped>

</style>
