<?php get_header();
$social_media = get_field('social_media', 'option');
$phone_number = get_field('phone_number', 'option');
$landline_number = get_field('landline_number', 'option');
$email_address = get_field('email_address', 'option');
$location = get_field('location', 'option');
$google_map = get_field('google_map', 'option');
?>
<section class="contact-us sp-tb">
    <div class="maincontainer">
        <div class="row">
            <div class="col-lg-6">
                <h4 class="entry-title">Leave Us Message</h4>
                <p>If you have any questions about the services we provide simply use the form below. We try and respond to all queries and comments within 24 hours.</p>
                <?php echo do_shortcode('[contact-form-7 id="4dd4dfa" title="Contact Form"]'); ?>
                <!-- <form>
                    <div class="row">
                        <div class="col-12">
                            <label>Name <span>*</span></label>
                            <input type="text" class="form-control" placeholder="Enter name">
                        </div>
                        <div class="col-md-6">
                            <label>Phone <span>*</span></label>
                            <input type="tel" class="form-control" placeholder="Enter phone">
                        </div>
                        <div class="col-md-6">
                            <label>Email <span>*</span></label>
                            <input type="email" class="form-control" placeholder="Enter email">
                        </div>
                        <div class="col-12">
                            <label>Subject</label>
                            <input type="text" class="form-control" placeholder="Enter subject">
                        </div>
                        <div class="col-12">
                            <label>Message</label>
                            <textarea class="form-control" placeholder="Enter message"></textarea>
                        </div>
                        <div class="col-12">
                            <input type="submit" value="Submit Now">
                        </div>
                    </div>
                </form> -->
            </div>
            <div class="col-lg-5 offset-lg-1">
                <div class="contact-aside">
                    <h4 class="entry-title">Get In Touch</h4>
                    <p>We try and respond to all queries and comments within 24 hours.</p>
                    <div class="contact-det dark">
                        <ul>
                            <?php if (!empty($phone_number)) { ?>
                                <li>
                                    <i class="fa-solid fa-phone-volume"></i>
                                    <span>Phone</span>
                                    <?php foreach ($phone_number as $phone) { ?>
                                        <a href="tel:<?php echo $phone['phone']; ?>"><?php echo $phone['phone']; ?></a>
                                    <?php } ?>
                                </li>
                            <?php } ?>
                            <?php if (!empty($landline_number)) { ?>
                                <li>
                                    <i class="fa-solid fa-tty"></i>
                                    <span>Telephone</span>
                                    <?php foreach ($landline_number as $landline) { ?>
                                        <a href="tel:<?php echo $landline['landline']; ?>"><?php echo $landline['landline']; ?></a>
                                    <?php } ?>
                                </li>
                            <?php } ?>
                            <?php if (!empty($email_address)) { ?>
                                <li>
                                    <i class="fa-solid fa-envelope-open-text"></i>
                                    <span>Email Address</span>
                                    <?php foreach ($email_address as $email) { ?>
                                        <a href="mailto:<?php echo $email['email']; ?>"><?php echo $email['email']; ?></a>
                                    <?php } ?>
                                </li>
                            <?php } ?>
                            <?php if (!empty($location)) { ?>
                                <li>
                                    <i class="fa-solid fa-location-dot"></i>
                                    <span>Location</span>
                                    <a href="#"><?php echo $location; ?></a>
                                </li>
                            <?php } ?>
                        </ul>
                    </div>
                    <div class="social-media mt">
                        <h5>Stay Connected</h5>
                        <ul>
                            <?php
                            if (!empty($social_media)) {
                                foreach ($social_media as $media) {
                            ?>
                                    <li>
                                        <a href="<?php echo $media['link']; ?>" target="_blank"><?php echo $media['icon']; ?></a>
                                    </li>
                            <?php }
                            } ?>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <div class="google-map">
            <?php echo $google_map;   ?>
        </div>
    </div>
</section>
<?php get_footer(); ?>
