import { create } from "zustand";

interface PreviewToolbarState {
  deviceMode: "desktop" | "mobile";
  setDeviceMode: (mode: "desktop" | "mobile") => void;
  refreshKey: number;
  triggerRefresh: () => void;
}

export const usePreviewToolbarStore = create<PreviewToolbarState>((set) => ({
  deviceMode: "desktop",
  setDeviceMode: (mode) => set({ deviceMode: mode }),
  refreshKey: 0,
  triggerRefresh: () => set((state) => ({ refreshKey: state.refreshKey + 1 })),
}));
