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

/**
 * Workspace Edit Mode Store
 * Manages global edit mode state for workspace sidebar
 */
export const useWorkspaceEditStore = defineStore('workspaceEdit', () => {
  // Edit mode state
  const isEditMode = ref(false)
  
  // Enter edit mode
  function enterEditMode() {
    isEditMode.value = true
  }
  
  // Exit edit mode
  function exitEditMode() {
    isEditMode.value = false
  }
  
  // Toggle edit mode
  function toggleEditMode() {
    isEditMode.value = !isEditMode.value
  }
  
  return {
    isEditMode,
    enterEditMode,
    exitEditMode,
    toggleEditMode
  }
})
