import { LOCAL_STORAGE_KEYS } from 'common'
import { SIDEBAR_KEYS } from 'components/layouts/ProjectLayout/LayoutSidebar/LayoutSidebarProvider'
import { ButtonTooltip } from 'components/ui/ButtonTooltip'
import { useLocalStorageQuery } from 'hooks/misc/useLocalStorage'
import { SqlEditor } from 'icons'
import { useSidebarManagerSnapshot } from 'state/sidebar-manager-state'
import { cn, KeyboardShortcut } from 'ui'
const InlineEditorKeyboardTooltip = () => {
const [hotkeyEnabled] = useLocalStorageQuery(
LOCAL_STORAGE_KEYS.HOTKEY_SIDEBAR(SIDEBAR_KEYS.EDITOR_PANEL),
true
)
return hotkeyEnabled ? : null
}
export const InlineEditorButton = () => {
const { activeSidebar, toggleSidebar } = useSidebarManagerSnapshot()
const isOpen = activeSidebar?.id === SIDEBAR_KEYS.EDITOR_PANEL
const handleClick = () => {
toggleSidebar(SIDEBAR_KEYS.EDITOR_PANEL)
}
return (
SQL Editor
),
},
}}
>
)
}