import React, { useState } from 'react'; import { Button } from '../../ui/button'; import { Input } from '../../ui/input'; import { X, Lock, Globe } from 'lucide-react'; import { useToast } from '../../../components/feedback/ToastProvider'; interface SaveQueueAsPlaylistModalProps { onClose: () => void; onSave: (name: string, isPublic: boolean) => void; } export const SaveQueueAsPlaylistModal: React.FC< SaveQueueAsPlaylistModalProps > = ({ onClose, onSave }) => { const { addToast } = useToast(); const [name, setName] = useState(''); const [isPublic, setIsPublic] = useState(false); const handleSubmit = () => { if (!name) { addToast('Please name your playlist', 'error'); return; } onSave(name, isPublic); onClose(); }; return (

Save Queue as Playlist

setName(e.target.value)} autoFocus placeholder="My Queue Session" />
setIsPublic(!isPublic)} >
{isPublic ? ( ) : ( )}
{isPublic ? 'Public Playlist' : 'Private Playlist'}
{isPublic ? 'Visible on your profile' : 'Only visible to you'}
); };