import Link from 'next/link';
import footerData from './footer.json';

const FooterTop = () => {
    const { top } = footerData;

    return (
        <footer className="footer-section fix bg-cover" style={{ backgroundImage: `url('${top.bgImage}')` }}>
            <div className="container">
                <div className="footer-wrapper">
                    <div className="row">
                        <div className="col-xl-12">
                            <div className="footer-item">
                                <h2>
                                    <a href={top.phone.href}>{top.phone.display}</a>
                                </h2>
                                <h2 className="text">{top.address}</h2>
                                <div className="footer-list-item">
                                    <Link href={top.logo.href}>
                                        <img src={top.logo.src} alt={top.logo.alt} />
                                    </Link>
                                    <ul className="footer-list">
                                        {top.menuLinks.map((item, index) => (
                                            <li key={index}>
                                                <Link href={item.href}>{item.label}</Link>
                                            </li>
                                        ))}
                                    </ul>
                                    <div className="social-icon">
                                        {top.socialLinks.map((social, index) => (
                                            <a key={index} href={social.href}>
                                                <i className={social.icon}></i>
                                            </a>
                                        ))}
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </footer>
    );
};

export default FooterTop;
