<?php
/*
Template Name: Contact
*/

get_header();

$phone = carbon_get_theme_option('contact_phone');
$mail = carbon_get_theme_option('contact_mail');

$address = carbon_get_theme_option('contact_address');
$address_url = carbon_get_theme_option('contact_address_map_link');

$facebook = carbon_get_theme_option('contact_facebook');
$insta = carbon_get_theme_option('contact_insta');

$company = carbon_get_theme_option('contact_company');

$nip = carbon_get_theme_option('contact_nip');
$regon = carbon_get_theme_option('contact_regon');

?>

<main>
    <div class="contact__wrapper">
        <div class="basic-info">
            <div class="element">
                <div class="strong"><?php echo get_bloginfo('name'); ?></div><br/>
                <?php if($address){ ?><div class="address__wrapper"><a href="<?=$address_url?>" class="address"><?=$address?></a></div><?php } ?>

                <?php if($phone){ ?><a href="tel:<?=$phone?>" class="tel"><img src="https://usg24.com/wp-content/uploads/2024/09/Frame-57.png" alt="telephone icon"><?=$phone?></a><br/><?php } ?>
                <?php if($mail){ ?><a href="mailto:<?=$mail?>" class="mail"><img src="https://usg24.com/wp-content/uploads/2024/09/Frame-57-1.png" alt="mail icon"><?=$mail?></a><?php } ?>

                <div class="social__media">
                    <?php if($facebook){ ?><a target="_blank" href="<?=$facebook?>"><img src="https://usg24.com/wp-content/uploads/2024/09/icons8-facebook-новый-50-1.png" alt="facebook icon"></a><?php } ?>
                    <?php if($insta){ ?><a target="_blank" href="<?=$insta?>"><img src="https://usg24.com/wp-content/uploads/2024/09/icons8-instagram-1.png" alt="instagram icon"></a><?php } ?>
                    <div>sieci społecznościowe</div>
                </div>
            </div>
            <ul class="element">
                <?php if($company){ ?><li><?=$company?></li><?php } ?>
                <?php if($address){ ?><li>Adres: <a href="<?=$address_url?>" class="address"><?=$address?></a></li><?php } ?>
                <?php if($nip){ ?><li>NIP: <?=$nip?></li><?php } ?>
                <?php if($regon){ ?><li>REGON: <?=$regon?></li><?php } ?>
            </ul>
        </div>

        <div class="map__wrapper">
            <iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d610.7990093281543!2d20.970651269684396!3d52.2398228194852!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x471ecb795130f777%3A0x7a36c4e93f865a4a!2sM%C5%82ynarska%2042%2C%2001-171%20Warszawa!5e0!3m2!1spl!2spl!4v1727172270726!5m2!1spl!2spl" width="600" height="450" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
        </div>
    </div>
</main>

<?php
get_footer();
?>