import React, { useMemo } from 'react'; import { createPortal } from 'react-dom'; import { Button } from '../shared/ui/controls'; import { PlaylistsPanel, playlistsPanelLabelsFromT, } from '../shared/playlists/PlaylistsPanel'; import styles from './EditorApp.module.css'; import { useEditorI18n } from './i18n/EditorI18nContext'; import panelStyles from './PlaylistsModal.module.css'; export function PlaylistsManagerModal({ open, onClose, }: { open: boolean; onClose: () => void; }) { const { t } = useEditorI18n(); const labels = useMemo(() => playlistsPanelLabelsFromT(t), [t]); if (!open) return null; return createPortal( <>