mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
20 lines
547 B
TypeScript
20 lines
547 B
TypeScript
import { create } from "zustand";
|
|||
|
|
|
||
|
|
interface ClipEffectsTarget {
|
||
|
|
elementId: string;
|
||
|
|
trackId: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
interface PropertiesState {
|
||
|
|
clipEffectsTarget: ClipEffectsTarget | null;
|
||
|
|
openClipEffects: ({ elementId, trackId }: ClipEffectsTarget) => void;
|
||
|
|
closeClipEffects: () => void;
|
||
|
|
}
|
||
|
|
|
||
|
|
export const usePropertiesStore = create<PropertiesState>()((set) => ({
|
||
|
|
clipEffectsTarget: null,
|
||
|
|
openClipEffects: ({ elementId, trackId }) =>
|
||
|
|
set({ clipEffectsTarget: { elementId, trackId } }),
|
||
|
|
closeClipEffects: () => set({ clipEffectsTarget: null }),
|
||
|
|
}));
|