import { computed, ref } from 'vue' export interface KfSelectionKey { layerId: string kind: 'main' | 'position' | 'rotation' keyframeId: string } const selectedKfs = ref([]) export function kfSelectionKey(k: KfSelectionKey): string { return `${k.layerId}:${k.kind}:${k.keyframeId}` } const selectedKfSet = computed(() => { const s = new Set() for (const k of selectedKfs.value) s.add(kfSelectionKey(k)) return s }) export function useKfSelection() { return { selectedKfs, selectedKfSet } }