<?php
$attributes = '';
if ($args['id']) {
    $attributes .= ' id="' . $args['id'] . '" ';
}

if ($args['class']) {
    $attributes .= ' class="' . $args['class'] . '" ';
} else {
    $attributes .= ' class="regular-text" ';
}

if ($args['style']) {
    $attributes .= ' style="' . $args['style'] . '" ';
}

$placeholder = isset($args['placeholder']) ? $args['placeholder'] : 'Edit this text with placeholder key';

$conditional = salesloo_field_get_conditional_data($args);

?>
<div class="salesloo-field <?php echo $args['direction']; ?>" <?php echo implode(' ', $conditional); ?>>
    <div class="salesloo-field-label">
        <label><?php echo $args['label']; ?></label>
    </div>
    <div class="salesloo-field-input">
        <div class="salesloo-field__link">
            <?php echo $args['before']; ?>
            <a target="_blank" href="<?php echo $args['value']; ?>" <?php echo $attributes; ?>><?php echo $placeholder; ?></a>
            <?php echo $args['after']; ?>
        </div>
        <p class="description"><?php echo $args['description']; ?></p>
    </div>
</div>