<div x-data="{
        fp: null,
        <?php if($hasWireModel()): ?>
            value: <?php if ((object) ($attributes->wire('model')) instanceof \Livewire\WireDirective) : ?>window.Livewire.find('<?php echo e($_instance->id); ?>').entangle('<?php echo e($attributes->wire('model')->value()); ?>')<?php echo e($attributes->wire('model')->hasModifier('defer') ? '.defer' : ''); ?><?php else : ?>window.Livewire.find('<?php echo e($_instance->id); ?>').entangle('<?php echo e($attributes->wire('model')); ?>')<?php endif; ?>,
        <?php elseif($hasXModel()): ?>
            value: <?php echo e($attributes->first('x-model')); ?>,
        <?php else: ?>
            value: <?php echo e($value ? "'{$value}'" : 'null'); ?>,
        <?php endif; ?>
        updateValue(newValue) {
            this.value = newValue;
            $dispatch('input', newValue);

            try {
                this.fp.setDate(newValue);
            } catch {}

            <?php if($hasXModel()): ?>
                <?php echo e($attributes->first('x-model')); ?> = newValue;
            <?php endif; ?>
        },
     }"
     x-init="fp = flatpickr($refs.input, {
        defaultDate: value,
        onOpen: [
            function (selectedDates, dateStr, instance) {
                instance.setDate(value);
            },
            <?php echo e($onOpen ?? ''); ?>

        ],
        <?php echo e($jsonOptions()); ?>

        <?php echo e($optionsSlot ?? ''); ?>

     })"
     x-on:change="updateValue($event.target.value)"
     class="input-group <?php echo e($getContainerClass()); ?>"
     <?php echo e($extraAttributes); ?>

>
    <?php if($toggleIcon !== false): ?>
        <span x-on:click="fp.open()"
            class="input-group-text"
            role="button"
            title="<?php echo e(__('components.messages.date_picker_toggle_icon_title')); ?>"
        >
            <span class="h-5 w-5 text-slate-400">
                <?php if (isset($component)) { $__componentOriginalf7b6b6c4bc4eccc8de0185d678bdf3c8197f591f = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\Icon::class, ['name' => 'calendar'] + (isset($attributes) ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('icon'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $constructor = (new ReflectionClass(App\View\Components\Icon::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['class' => 'icon']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalf7b6b6c4bc4eccc8de0185d678bdf3c8197f591f)): ?>
<?php $component = $__componentOriginalf7b6b6c4bc4eccc8de0185d678bdf3c8197f591f; ?>
<?php unset($__componentOriginalf7b6b6c4bc4eccc8de0185d678bdf3c8197f591f); ?>
<?php endif; ?>
            </span>
            <i class="tf-icons bx bx-<?php echo e($toggleIcon); ?>"></i>
        </span>
    <?php else: ?>
        <?php echo $__env->make('partials.leading-addons', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php endif; ?>

    <input
        <?php echo e($attributes->merge(['class' => $inputClass()])->except('type')->whereDoesntStartWith('wire:model')); ?>


        wire:ignore
        <?php if($name): ?> name="<?php echo e($name); ?>" <?php endif; ?>
        <?php if($id): ?> id="<?php echo e($id); ?>" <?php endif; ?>
        x-ref="input"

        <?php if (! ($hasXModel())): ?>
            x-bind:value="value"
        <?php endif; ?>

        placeholder="<?php echo e($placeholder); ?>"

        <?php if($value && ! $hasBoundModel()): ?> value="<?php echo e($value); ?>" <?php endif; ?>

        <?php echo $ariaDescribedBy(); ?>

        <?php if($hasErrorsAndShow($name)): ?>
            aria-invalid="true"
        <?php endif; ?>
    />

    <?php if($clearable): ?>
        <div class="trailing-icon pr-3 flex items-center absolute inset-y-0 right-0">
            <button x-show="Boolean(value)"
                    x-transition
                    x-cloak
                    x-on:click="updateValue(null)"
                    class=""
                    type="button"
            >
                <span class="sr-only"><?php echo e(__('components.messages.date_picker_clear_button')); ?></span>
                <span class="input-group-text"><?php if (isset($component)) { $__componentOriginalf7b6b6c4bc4eccc8de0185d678bdf3c8197f591f = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\Icon::class, ['name' => $clearIcon] + (isset($attributes) ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('icon'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $constructor = (new ReflectionClass(App\View\Components\Icon::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['class' => 'icon']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalf7b6b6c4bc4eccc8de0185d678bdf3c8197f591f)): ?>
<?php $component = $__componentOriginalf7b6b6c4bc4eccc8de0185d678bdf3c8197f591f; ?>
<?php unset($__componentOriginalf7b6b6c4bc4eccc8de0185d678bdf3c8197f591f); ?>
<?php endif; ?></span>
            </button>
        </div>
    <?php else: ?>
        <?php echo $__env->make('partials.trailing-addons', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php endif; ?>
</div>
<?php /**PATH /var/www/html/beta/elv3/resources/views/components/form/date-picker.blade.php ENDPATH**/ ?>