import { motion } from 'framer-motion';
export const controlBtnSpring = { type: 'spring', stiffness: 400, damping: 22 };
export const ControlButton = ({ onClick, label, children, delay = 0 }) => (
<motion.button
onClick={onClick}
className="control-btn"
initial={{ opacity: 0, scale: 0.5 }}
animate={{ opacity: 1, scale: 1 }}
exit={{ opacity: 0, scale: 0.5 }}
whileTap={{ scale: 0.88 }}
whileHover={{ scale: 1.06 }}
transition={{ ...controlBtnSpring, delay }}
aria-label={label}
>
{children}
</motion.button>
);
export const PlayIcon = ({ size = 22 }) => (
<svg width={size} height={size} viewBox="0 0 24 24" fill="white">
<path d="M8 5.14v14l11-7-11-7z" />
</svg>
);
export const PauseIcon = ({ size = 22 }) => (
<svg width={size} height={size} viewBox="0 0 24 24" fill="white">
<rect x="6" y="4" width="4" height="16" rx="1" />
<rect x="14" y="4" width="4" height="16" rx="1" />
</svg>
);
export const StopIcon = ({ size = 18 }) => (
<svg width={size} height={size} viewBox="0 0 24 24" fill="white">
<rect x="6" y="6" width="12" height="12" rx="2" />
</svg>
);
export const MuteIcon = ({ muted, size = 20 }) => (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="white" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round">
{muted ? (
<>
<path d="M11 5L6 9H2v6h4l5 4V5z" fill="white" stroke="none" />
<line x1="23" y1="9" x2="17" y2="15" />
<line x1="17" y1="9" x2="23" y2="15" />
</>
) : (
<>
<path d="M11 5L6 9H2v6h4l5 4V5z" fill="white" stroke="none" />
<path d="M15.54 8.46a5 5 0 0 1 0 7.07" />
<path d="M19.07 4.93a10 10 0 0 1 0 14.14" />
</>
)}
</svg>
);
export const SoundIcon = () => (
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
<path d="M9 18V5l12-2v13" />
<circle cx="6" cy="18" r="3" />
<circle cx="18" cy="16" r="3" />
</svg>
);