'use client';

import { useState } from 'react';
import { Button } from '@/components/ui/button';
import { MessageSquare, X } from 'lucide-react';
import SupportRequestModal from './SupportRequestModal';

export default function SupportChatButton() {
    const [isOpen, setIsOpen] = useState(false);

    return (
        <>
            <Button
                onClick={() => setIsOpen(true)}
                className="fixed bottom-20 right-6 rounded-full p-4 shadow-lg z-50"
                variant="default"
                size="lg"
            >
                <MessageSquare className="h-6 w-6" />
                <span className="sr-only">Get Support</span>
            </Button>

            <SupportRequestModal isOpen={isOpen} onClose={() => setIsOpen(false)} />
        </>
    );
}