<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;

$__newAttributes = [];
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames(([
    'variant' => 'outline', // outline or filled
    'size' => 'md', // sm, md, lg
    'label' => null,
    'placeholder' => '',
    'rows' => 4,
    'error' => null
]));

foreach ($attributes->all() as $__key => $__value) {
    if (in_array($__key, $__propNames)) {
        $$__key = $$__key ?? $__value;
    } else {
        $__newAttributes[$__key] = $__value;
    }
}

$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);

unset($__propNames);
unset($__newAttributes);

foreach (array_filter(([
    'variant' => 'outline', // outline or filled
    'size' => 'md', // sm, md, lg
    'label' => null,
    'placeholder' => '',
    'rows' => 4,
    'error' => null
]), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
    $$__key = $$__key ?? $__value;
}

$__defined_vars = get_defined_vars();

foreach ($attributes->all() as $__key => $__value) {
    if (array_key_exists($__key, $__defined_vars)) unset($$__key);
}

unset($__defined_vars, $__key, $__value); ?>

<?php
    $wireModel = collect($attributes->getAttributes())->keys()->first(fn($key) => str_starts_with($key, 'wire:model'));

    if ($wireModel) {
        $field = $attributes->get($wireModel);
        $error = $errors->first($field);
    }

    $baseWrapper = 'relative rounded-md';

    // EXACT same base as input
    $baseTextarea = 'block w-full rounded-md border bg-white text-gray-900 placeholder:text-gray-400
                     dark:bg-[#2F2F2F] dark:text-gray-100 dark:placeholder:text-zinc-400
                     focus:outline-none focus:ring-2 transition-colors duration-200 ease-in-out
                     resize-none placeholder:text-sm';

    // EXACT same variants
    $variants = [
        'outline' => 'border-gray-300 focus:border-primary-500 focus:ring-primary-500
                      dark:border-gray-600 dark:focus:border-primary-400 dark:focus:ring-primary-400',
        'filled' => 'border-transparent bg-gray-100 focus:border-primary-500 focus:bg-white focus:ring-primary-500
                     dark:bg-gray-700 dark:focus:border-primary-400 dark:bg-gray-800 dark:focus:ring-primary-400'
    ];

    // EXACT same sizes
    $sizes = [
        'sm' => 'px-2 py-1 text-sm',
        'md' => 'px-4 py-2 text-base',
        'lg' => 'px-6 py-3 text-lg'
    ];

    // Height equivalents for textarea (mapped from input sizes)
    $sizeHeight = match ($size) {
        'sm' => 'min-h-[5rem] leading-[1.125rem] rounded-md',
        'md' => 'min-h-[8rem] leading-[1.375rem] rounded-lg',
        'lg' => 'min-h-[10rem] leading-[1.625rem] rounded-lg',
        default => 'min-h-[8rem] leading-[1.375rem] rounded-lg'
    };

    $textareaClasses = collect([
        $baseTextarea,
        $variants[$variant] ?? $variants['outline'],
        $sizes[$size] ?? $sizes['md'],
        $sizeHeight,
        'shadow-xs border',
        'bg-white dark:bg-white/10 dark:disabled:bg-white/[7%]',
        'text-zinc-700 dark:text-zinc-300 disabled:text-zinc-500 dark:disabled:text-zinc-400',
        $error
            ? 'border-red-500 focus:ring-red-500 focus:border-red-500
               dark:border-red-400 dark:focus:ring-red-400 dark:focus:border-red-400'
            : 'border border-zinc-200 border-b-zinc-300/80 dark:border-white/10'
    ])->implode(' ');
?>

<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($label): ?>
    <label class="block mb-2 text-sm font-medium text-gray-700 dark:text-gray-200">
        <?php echo e($label); ?>

    </label>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

<div class="<?php echo e($baseWrapper); ?>">
    <textarea rows="<?php echo e($rows); ?>" placeholder="<?php echo e($placeholder); ?>"
        <?php echo e($attributes->merge(['class' => $textareaClasses])); ?>></textarea>
</div>

<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($error): ?>
    <p class="mt-1 text-sm text-red-600 dark:text-red-400 flex items-center gap-1">
        <?php if (isset($component)) { $__componentOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::icon.index','data' => ['name' => 'exclamation-circle','class' => 'h-4 w-4']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('flux::icon'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['name' => 'exclamation-circle','class' => 'h-4 w-4']); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2)): ?>
<?php $attributes = $__attributesOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2; ?>
<?php unset($__attributesOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2)): ?>
<?php $component = $__componentOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2; ?>
<?php unset($__componentOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2); ?>
<?php endif; ?>
        <?php echo e($error); ?>

    </p>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php /**PATH /Users/macuser/Herd/Novabank/resources/views/components/textarea.blade.php ENDPATH**/ ?>