import { defineStore } from 'pinia';

// eslint-disable-next-line import/prefer-default-export
export const useTooltipHighlightStore = defineStore('highlight', {
  state: () => ({ currentIndex: { dataIndex: 0, seriesIndex: 0 } }),

  actions: {
    updateIndex(dataIndex, seriesIndex) {
      this.currentIndex.dataIndex = dataIndex;
      this.currentIndex.seriesIndex = seriesIndex;
    },
  },
});
