import { computed } from "vue";
import { defineStore } from "pinia";
import { useWorkbenchStore } from "./workbench";

export const useSessionsStore = defineStore("sessions", () => {
  const workbench = useWorkbenchStore();
  const tabs = computed(() => workbench.sessionTabs);
  const selectedSessionId = computed(() => workbench.selectedSessionId);
  return { tabs, selectedSessionId, create: workbench.createSession, select: workbench.selectSession };
});
