@php $name = $name ?? $moduleName; $label = $label ?? 'Missing browser label'; $endpointsFromModules = isset($modules) ? collect($modules)->map(function ($module) { return [ 'label' => $module['label'] ?? ucfirst($module['name']), 'value' => moduleRoute($module['name'], $module['routePrefix'] ?? null, 'browser', $module['params'] ?? [], false) ]; })->toArray() : null; $endpoints = $endpoints ?? $endpointsFromModules ?? []; $endpoint = $endpoint ?? (!empty($endpoints) ? null : moduleRoute($moduleName, $routePrefix ?? null, 'browser', $params ?? [], false)); $max = $max ?? 1; $itemLabel = $itemLabel ?? strtolower($label); $note = $note ?? 'Add' . ($max > 1 ? " up to $max ". $itemLabel : ' one ' . Str::singular($itemLabel)); $fieldNote = $fieldNote ?? ''; $sortable = $sortable ?? true; $wide = $wide ?? false; $buttonOnTop = $buttonOnTop ?? false; $browserNote = $browserNote ?? ''; $disabled = $disabled ?? false; $connectedBrowserField = $connectedBrowserField ?? false; @endphp {{ $note }} @unless($renderForBlocks) @push('vuexStore') @if (isset($form_fields['browsers']) && isset($form_fields['browsers'][$name])) window['{{ config('twill.js_namespace') }}'].STORE.browser.selected["{{ $name }}"] = {!! json_encode($form_fields['browsers'][$name]) !!} @endif @endpush @endunless