<?php
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { exit; }
/**
 * Button Component.
 * Usage: get_template_part( 'template-parts/components/btn', null, $args );
 */
$text    = $args['text'] ?? '';
$href    = $args['href'] ?? '#';
$variant = $args['variant'] ?? 'primary';
$size    = $args['size'] ?? '';
if ( ! $text ) { return; }

$classes = 'wte-btn wte-btn--' . esc_attr( $variant );
if ( $size ) { $classes .= ' wte-btn--' . esc_attr( $size ); }
?>
<a href="<?php echo esc_url( $href ); ?>" class="<?php echo esc_attr( $classes ); ?>">
	<?php echo esc_html( $text ); ?>
</a>
