import React, { useCallback } from 'react'
import { useGetOne } from 'react-admin'
import { GlobalHotKeys } from 'react-hotkeys'
import { LoveButton, useToggleLove } from '../common'
import { keyMap } from '../hotkeys'
import config from '../config'
const Placeholder = () => (
<>
{config.enableFavourites && (
)}
>
)
const Toolbar = ({ id }) => {
const { data, loading } = useGetOne('song', id)
const [toggleLove, toggling] = useToggleLove('song', data)
const handlers = {
TOGGLE_LOVE: useCallback(() => toggleLove(), [toggleLove]),
}
return (
<>
{config.enableFavourites && (
)}
>
)
}
const PlayerToolbar = ({ id, isRadio }) =>
id && !isRadio ? :
export default PlayerToolbar