<script setup lang="ts">
import { ref } from 'vue'
import PlaneLoader from "@/Components/FlightsGoneBy/PlaneLoader.vue";
import {ChartType} from "@/Types/types";
import VueApexCharts from 'vue3-apexcharts'


defineProps<{
    type: ChartType
    height: number | string
    options: object
    series: unknown[]
}>()

const ready = ref(false)
</script>

<template>
        <PlaneLoader v-if="!ready" />
        <VueApexCharts
            :type="type"
            :height="height"
            :options="options"
            :series="series"
            :class="{ 'chart-hidden': !ready }"
            @mounted="ready = true"
        />
</template>

<style scoped>
</style>
