<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>

<?php
    $ehx_form = get_post_meta($post->ID, 'ehx_form', true);
    $ehx_mode = isset($ehx_form['_ehx_mode']) ? $ehx_form['_ehx_mode'] : 'register';
    $types = [
        'register' => esc_html__('Registration Form', 'ehx-members'),
        'profile' => esc_html__('Profile Form', 'ehx-members'),
        'login' => esc_html__('Login Form', 'ehx-members'),
    ];
?>
<div class="ehx-admin-boxed-links ehx-admin-ajaxlink">
    <?php foreach($types as $key => $type): ?>
        <a href="javascript:void(0);" data-role="<?php echo esc_attr($key); ?>" class="<?php echo $ehx_mode == $key ? 'ehx-admin-activebg':''; ?>"><?php echo esc_html($type); ?></a>
    <?php endforeach ?>
    <input type="hidden" name="ehx_form[_ehx_mode]" id="form__ehx_mode" value="<?php echo esc_html($ehx_mode); ?>">
</div>
<div class="clear"></div>