<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag; ?>
<?php foreach($attributes->onlyProps([
    'href' => null,
    'type' => 'button',
    'variant' => 'primary',
]) as $__key => $__value) {
    $$__key = $$__key ?? $__value;
} ?>
<?php $attributes = $attributes->exceptProps([
    'href' => null,
    'type' => 'button',
    'variant' => 'primary',
]); ?>
<?php foreach (array_filter(([
    'href' => null,
    'type' => 'button',
    'variant' => 'primary',
]), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
    $$__key = $$__key ?? $__value;
} ?>
<?php $__defined_vars = get_defined_vars(); ?>
<?php foreach ($attributes as $__key => $__value) {
    if (array_key_exists($__key, $__defined_vars)) unset($$__key);
} ?>
<?php unset($__defined_vars); ?>

<?php
    // Paleta por variante
    $palette = [
        'main'   => 'btn-main',
        'primary'   => 'btn-primary',
        'secondary' => 'btn-secondary',
        'optional' => 'btn-optional',
        'cancel' => 'btn-cancel',
        'add' => 'btn-add',
        'remove' => 'btn-remove'
    ][$variant] ?? '';
?>


<?php if($href): ?>
    <a href="<?php echo e($href); ?>"
       <?php echo e($attributes->merge(['class' => "btn parrafo $palette"])); ?>>
        <span class="truncate"><?php echo e($slot); ?></span>
    </a>
<?php else: ?>
    <button type="<?php echo e($type); ?>"
            <?php echo e($attributes->merge(['class' => "btn parrafo $palette"])); ?>>
        <span class="truncate"><?php echo e($slot); ?></span>
    </button>
<?php endif; ?><?php /**PATH C:\laragon\www\housecontract\resources\views/components/controls/button.blade.php ENDPATH**/ ?>