@php $isCustomPlaceholder = isset($placeholder); @endphp @props([ 'label' => '', 'multiple' => false, 'required' => false, 'disabled' => false, 'maxFiles' => null, 'placeholder' => __('Drag & Drop your files or Browse '), 'maxfilesmsg' => __('You can upload a maximum of :max files.'), ]) @php if (!($wireModelAttribute = $attributes->whereStartsWith('wire:model')->first())) { throw new Exception('You must wire:model to the filepond input.'); } $pondProperties = $attributes->except(['class', 'placeholder', 'required', 'disabled', 'multiple', 'wire:model']); if ($maxFiles !== null) { $pondProperties['max-files'] = $maxFiles; } // convert keys from kebab-case to camelCase $pondProperties = collect($pondProperties) ->mapWithKeys(fn($value, $key) => [Illuminate\Support\Str::camel($key) => $value]) ->toArray(); $pondLocalizations = __('livewire-filepond::filepond'); @endphp