<?php

/**
 * =============================================================================
 * @package         Blue Raven (Free Version)
 * @Plugin URI      https://enterrahost.com/plugins/blue-raven
 * 
 * @Author          EnterraHost
 * @Author URI      https://enterrahost.com
 * @License         GPL-2.0-or-later
 *  
 * @Copyright       (c) 2025 EnterraHost
 * @Contents        Contact block for Main Schema Tools  
 *
 * =============================================================================
 * 
 * || INDEX:
 * ||   - CONTACT BLOCK
 * ||   
 * =============================================================================
 */

if ( ! defined( 'ABSPATH' ) ) exit; 

/*
============================================================
    CONTACT BLOCK
============================================================
*/

$id = isset($id) ? esc_attr($id) : uniqid('contact_');
?>

<div class="contact-block" style="margin: 16px auto;" data-contact-id="<?php echo esc_attr($id); ?>">
    <div class="flex-sb" style="margin-bottom: 8px;">
        <div style="width: 48%">
            <label>
                <p style="margin-bottom: 8px;"><strong><?php esc_html_e('Contact Type', 'blue-raven'); ?></strong></p>
                <input type="text" name="contact-type[]" placeholder="<?php esc_attr_e('Sales or Support etc...', 'blue-raven'); ?>" class="br-input" style="width:100%;" id="contact-type-<?php echo esc_attr($id); ?>">
            </label>
        </div>
    </div>

    <div class="flex-sb" style="margin-bottom: 8px;">
        <div style="width: 48%">
            <label>
                <p style="margin-bottom: 8px;"><strong><?php esc_html_e('Contact Email', 'blue-raven'); ?></strong></p>
                <input type="text" name="contact-email[]" placeholder="sales@" class="br-input" style="width:100%;" id="contact-email-<?php echo esc_attr($id); ?>">
            </label>
        </div>
        <div style="width: 48%">
            <label>
                <p style="margin-bottom: 8px;"><strong><?php esc_html_e('Contact Number', 'blue-raven'); ?></strong></p>
                <input type="text" name="contact-number[]" placeholder="+1-555-035-2502" class="br-input" style="width:100%;" id="contact-number-<?php echo esc_attr($id); ?>">
            </label>
        </div>
    </div>

    <div class="flex-sb" style="margin-bottom: 8px;">
        <div style="width: 48%">
            <label>
                <p style="margin-bottom: 8px;"><strong><?php esc_html_e('URL', 'blue-raven'); ?></strong></p>
                <input type="text" name="url[]" placeholder="https://..." class="br-input" style="width:100%;" id="url-<?php echo esc_attr($id); ?>">
            </label>
        </div>
        <div style="width: 48%">
            <label>
                <p style="margin-bottom: 8px;"><strong><?php esc_html_e('Languages', 'blue-raven'); ?></strong></p>
                <input type="text" name="languages[]" placeholder="<?php esc_attr_e('English, Spanish, French', 'blue-raven'); ?>" class="br-input" style="width:100%;" id="languages-<?php echo esc_attr($id); ?>">
            </label>
        </div>
    </div>

    <div style="text-align: right; margin-top: 16px;">
        <?php esc_html_e('Remove this Contact Point.', 'blue-raven'); ?>
        <a class="enterra-button open-botton remove-contact" data-tool="remove-contact" id="remove-contact-<?php echo esc_attr($id); ?>" style="margin-left: 2rem;">❌️</a>
    </div>
</div>