import type { FlowKeyType } from '../flowProperties.ts';
import { defineStore } from 'pinia';
import { ref } from 'vue';

export const useSelectedInfoStore = defineStore('selectedInfo', () => {
  const selectType = ref<FlowKeyType | undefined>(undefined);
  const selectId = ref<string>('');
  function setSelectId(id: string) {
    selectId.value = id;
  }

  function setSelectType(type: FlowKeyType | undefined) {
    selectType.value = type;
  }

  return { selectId, setSelectId, selectType, setSelectType };
});
