import React from 'react';
import bannerImg from '../assets/wmremove-transformed.jpeg';
import { Link } from 'react-router-dom';

export const Banner = () => {
    // 处理聊天按钮点击事件
    const handleChatClick = (e) => {
        e.preventDefault();
        // 在当前窗口打开链接，而不是新窗口
        window.location.href = 'https://www.zhaolaw.com/contact';
    };

    return (
        <div className='banner-container position-relative'>
            <div className='banner-image-wrapper'>
                <img src={bannerImg} alt='Beijing Zhong Zhao Law Firm' className='banner-image' />
            </div>
            <div className='banner-overlay'>
                <div className='banner-content'>
                    <h1 className='banner-title'>北京中兆律师事务所</h1>
                    <p className='banner-slogan'>Dedicated Hardworking Integrity Keep One's Word</p>
                    <Link to='/chat' className='btn btn-primary-custom chat-now-btn'>
                        开始聊天
                    </Link>
                </div>
            </div>
        </div>
    );
};
