import { computed, ref } from "vue";
//#region src/v2/features/collection/components/Editor/hooks/use-editor-state.ts
var DIAGNOSTICS_COLLAPSED_BOTTOM_PADDING = 46;
var DIAGNOSTICS_EXPANDED_BOTTOM_PADDING = 155;
var useEditorState = () => {
	const isAutoSaveEnabled = ref(false);
	const isDirty = ref(false);
	const editorLanguage = ref("json");
	const isDiagnosticsPaneExpanded = ref(false);
	const isEditorMaximized = ref(false);
	const isYamlMode = computed(() => editorLanguage.value === "yaml");
	const editorBottomPadding = computed(() => isDiagnosticsPaneExpanded.value ? DIAGNOSTICS_EXPANDED_BOTTOM_PADDING : DIAGNOSTICS_COLLAPSED_BOTTOM_PADDING);
	const editorRootClass = computed(() => isEditorMaximized.value ? "fixed inset-0 z-50 h-screen w-screen border bg-b-1 p-3 mac:pt-12" : "");
	const getLanguageToggleClass = (isActive) => {
		return `rounded-none px-2 py-1 text-[11px] leading-4 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-c-accent/30 focus-visible:ring-offset-1 focus-visible:ring-offset-b-1 first:rounded-md last:rounded-md ${isActive ? "bg-b-2 text-c-1 hover:bg-b-2" : "text-c-2 hover:bg-b-2/60 hover:text-c-1"}`;
	};
	const toggleEditorMaximized = () => {
		isEditorMaximized.value = !isEditorMaximized.value;
	};
	return {
		isAutoSaveEnabled,
		isDirty,
		editorLanguage,
		isDiagnosticsPaneExpanded,
		isEditorMaximized,
		isYamlMode,
		editorBottomPadding,
		editorRootClass,
		getLanguageToggleClass,
		toggleEditorMaximized
	};
};
//#endregion
export { useEditorState };

//# sourceMappingURL=use-editor-state.js.map