import { computed } from 'vue';
import { defineStore } from 'pinia';
import { useWorkbenchLayout } from '@/views/workbench/composables/use-workbench-layout';
import { SetupStoreId } from '@/enum';
import { useAuthStore } from '../auth';

export const useWorkbenchStore = defineStore(SetupStoreId.Workbench, () => {
  const authStore = useAuthStore();
  const userId = computed(() => String(authStore.userInfo?.userId ?? 'anonymous'));
  return useWorkbenchLayout({ userId: userId.value });
});
