import { create } from 'zustand' import { SplitOptions } from '../types' const DEFAULT_OPTIONS: SplitOptions = { format: 'mp3', transcode_to: '', drop_video: false, drop_subs: false, number_tracks: false, replace_bad_chars: false, replacement_char: '_', bad_chars: '!@#№$;:%^&?*(){}[]\\/<>+=~`\' ', skip_existing: false, output_template: '%an-%tn.%ext', album: '', comment: '', no_comment: false, comment_stream: null, merge_comments: false, comment_separator: '; ', tracklist_format: '%ts %tn - %an', // NEW } interface OptionsState { options: SplitOptions setOptions: (options: Partial) => void reset: () => void } export const useOptionsStore = create((set) => ({ options: { ...DEFAULT_OPTIONS }, setOptions: (newOptions) => set((state) => ({ options: { ...state.options, ...newOptions }, })), reset: () => set({ options: { ...DEFAULT_OPTIONS } }), }))