import { defineStore } from "pinia"

export interface ScreenState {
  mode: "pptEditor" | "pptScreen" | "mobileScreen" // 编辑模式还是 ppt预览模式
  screening: boolean
}

export const useScreenStore = defineStore("screen", {
  state: (): ScreenState => ({
    mode: "pptEditor",
    screening: false // 是否进入放映状态
  }),

  actions: {
    setScreening(screening: boolean) {
      this.screening = screening
    },
    setScreenMode(mode: ScreenState["mode"]) {
      this.mode = mode
    }
  }
})
