'use client'; import { useState } from 'react'; import { SocialShareButtons } from './SocialShareButtons'; import type { ShareType } from '@/types/api-types'; interface ShareModalProps { isOpen: boolean; onClose: () => void; shareUrl: string; title: string; type: ShareType; } export function ShareModal({ isOpen, onClose, shareUrl, title, type }: ShareModalProps) { const [copied, setCopied] = useState(false); if (!isOpen) return null; const handleCopyLink = async () => { try { await navigator.clipboard.writeText(shareUrl); setCopied(true); setTimeout(() => setCopied(false), 2000); } catch (err) { console.error('Failed to copy:', err); } }; const typeLabel = type === 'SONG' ? 'song' : type === 'PLAYLIST' ? 'playlist' : 'album'; return (
{title}
{/* Copy Link */}