File size: 3,413 Bytes
5d33320
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import React from 'react';
import { motion } from 'framer-motion';
import { Volume2, VolumeX, Instagram, Phone } from 'lucide-react';
import { SOCIAL_LINKS } from '../../data/mockData';
import { useAudio } from '../../context/AudioContext';

const HeaderControls: React.FC = () => {
    const { isMuted, toggleMute, playHoverSound } = useAudio();

    return (
        <div className="fixed top-6 right-6 z-50 flex items-center gap-4">

            

            {/* Audio Controller */}

            <motion.button

                onClick={toggleMute}

                onMouseEnter={playHoverSound}

                initial={{ opacity: 0, x: 20 }}

                animate={{ opacity: 1, x: 0 }}

                transition={{ delay: 1, duration: 0.5 }}

                className={`group flex items-center justify-center w-10 h-10 rounded-full bg-[#0e0303] shadow-lg transition-all duration-300 ${

                    isMuted 

                        ? "border border-red-500/30 hover:border-red-500/60 hover:bg-red-900/10" 

                        : "border border-white/10 hover:bg-brand-red/20"

                } focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-gold/40`}

                aria-label={isMuted ? "Unmute Ambient Sound" : "Mute Ambient Sound"}

            >

                {isMuted ? (

                    <VolumeX className="w-4 h-4 text-red-500/60 group-hover:text-red-400 transition-colors" />

                ) : (

                    <div className="relative">

                        <Volume2 className="w-4 h-4 text-brand-gold" />

                        {/* Pulse Effect when active */}

                        <span className="absolute inset-0 rounded-full animate-ping opacity-75 bg-brand-gold/20"></span>

                    </div>

                )}

            </motion.button>



            {/* Social Dock */}

            <motion.div 

                initial={{ opacity: 0, x: 20 }}

                animate={{ opacity: 1, x: 0 }}

                transition={{ delay: 1.1, duration: 0.5 }}

                className="flex items-center gap-2 px-3 py-2 rounded-full bg-[#0e0303] border border-white/10 shadow-lg"

            >

                <a 

                    href={SOCIAL_LINKS.instagram} 

                    target="_blank" 

                    rel="noopener noreferrer"

                    onMouseEnter={playHoverSound}

                    className="p-1.5 rounded-full hover:bg-white/10 text-white/70 hover:text-brand-accent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-gold/40"

                    aria-label="Instagram"

                >

                    <Instagram className="w-4 h-4" />

                </a>

                <a 

                    href={SOCIAL_LINKS.whatsapp} 

                    target="_blank" 

                    rel="noopener noreferrer"

                    onMouseEnter={playHoverSound}

                    className="p-1.5 rounded-full hover:bg-white/10 text-white/70 hover:text-green-400 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-gold/40"

                    aria-label="WhatsApp/Phone"

                >

                    <Phone className="w-4 h-4" />

                </a>

            </motion.div>

        </div>
    );
};

export default HeaderControls;