import { defineStore } from 'pinia'
import type { Scenes } from '@/api'

export type { Scenes, Scene } from '@/api'
export { SceneStatus, SceneType, SceneTypeDesc, sceneStatusDesc } from '@/api'

export const useSceneStore = defineStore('scene', {
  state: () => ({
    list: [] as Scenes
  }),
  getters: {
    getScenesByNums: state => (nums: string[]) =>
      state.list.filter(scene => nums.includes(scene.num))
  },
  actions: {
    async fetch() {
      // this.list = await fetchScenes()
    }
  }
})
