import { defineStore } from 'pinia'
import { ref } from 'vue'

export interface ChartState {
  symbol: string
  start_time: number | null
  end_time: number | null
  period: number
  selected_shapes: string[]
}

export const useChartStore = defineStore('chartState', () => {
  const symbol = ref<string>('BTC/USDT.BINANCE')
  const start_time = ref<number | null>(null)
  const end_time = ref<number | null>(null)
  const period = ref<number>(900) // seconds; default 15 minutes
  const selected_shapes = ref<string[]>([])

  return { symbol, start_time, end_time, period, selected_shapes }
})
