import React, { useState, useEffect } from 'react'; import { motion } from 'framer-motion'; // --- Icons --- const CalendarIcon = () => ; const ClockIcon = () => ; const VideoIcon = () => ; const MapPinIcon = () => ; // NEW ICON const ChevronDownIcon = () => ; export default function ScheduleInterviewModal({ isOpen, onClose, onConfirm, candidateName }) { // --- State --- const [date, setDate] = useState(''); const [time, setTime] = useState('10:00'); const [interviewType, setInterviewType] = useState('Technical'); const [mode, setMode] = useState('Online'); const [details, setDetails] = useState(''); const [interviewerName, setInterviewerName] = useState('Hiring Manager'); const [interviewerRole, setInterviewerRole] = useState('Technical Lead'); // Auto-fill Link for Online // Auto-fill Link for Online useEffect(() => { if (mode === 'Online' && !details) { const randomId = Math.random().toString(36).substring(7); // OLD (Fake): setDetails(`https://meet.google.com/${randomId}-intv`); // NEW (Working Real Video Call): setDetails(`https://meet.jit.si/IRIS-Interview-${candidateName.replace(/\s+/g, '')}-${randomId}`); } else if (mode === 'Offline' && details.includes('meet')) { setDetails(''); } }, [mode]); const handleSubmit = () => { if (!date || !time || !details) { alert('Please fill in Date, Time, and Location/Link.'); return; } onConfirm({ date, time, interviewType, mode, details, interviewerName, interviewerRole }); }; if (!isOpen) return null; // --- Styles --- const overlayStyle = { position: 'fixed', inset: 0, backgroundColor: 'rgba(0,0,0,0.85)', backdropFilter: 'blur(8px)', display: 'flex', alignItems: 'center', justifyContent: 'center', zIndex: 9999 }; // Modal Background: Dark Gray (#111827) const modalStyle = { width: '100%', maxWidth: '600px', backgroundColor: '#111827', border: '1px solid #374151', borderRadius: '1.5rem', padding: '2.5rem', boxShadow: '0 25px 50px -12px rgba(0, 0, 0, 0.9)' }; const labelStyle = { display: 'flex', alignItems: 'center', gap: '6px', color: '#9ca3af', fontSize: '0.85rem', fontWeight: '700', marginBottom: '0.6rem', textTransform: 'uppercase', letterSpacing: '0.05em' }; // Black Background (#000000) for high contrast const inputStyle = { width: '100%', padding: '0.875rem', borderRadius: '0.75rem', border: '1px solid #4B5563', backgroundColor: '#5b0e1aa1', color: '#FFFFFF', outline: 'none', fontSize: '1rem', transition: 'all 0.2s', colorScheme: 'dark' }; return (
Coordinate session with {candidateName}