# extendify/3.0.5/src/HelpCenter/state/globals-sync.js

Extendify, version 3.0.5. 22 lines.

- Page: https://pluginprobe.com/plugins/extendify/3.0.5/code/src/HelpCenter/state/globals-sync.js
- Raw: https://pluginprobe.com/plugins/extendify/3.0.5/raw/src/HelpCenter/state/globals-sync.js
- Modified: 2025-03-13T17:10:44+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/extendify/3.0.5/code/src/HelpCenter/state/globals-sync.js#L10-L20`.

```javascript
import { create } from 'zustand';
import { devtools, persist } from 'zustand/middleware';

const state = (set) => ({
	visibility: 'minimized', // open | minimized | closed
	queuedTour: null,
	queueTourForRedirect: (tour) => set({ queuedTour: tour }),
	clearQueuedTour: () => set({ queuedTour: null }),
	setVisibility: (visibility) => {
		if (!['open', 'minimized', 'closed'].includes(visibility)) {
			throw new Error('Invalid visibility state');
		}
		set({ visibility });
	},
});

export const useGlobalSyncStore = create(
	persist(devtools(state, { name: 'Extendify Help Center Globals Sync' }), {
		name: `extendify-help-center-globals-sync-${window.extSharedData.siteId}`,
	}),
);

```
