@inject('coreConfigRepository', 'Webkul\Core\Repositories\CoreConfigRepository')
@php
$nameKey = $item['key'] . '.' . $field['name'];
$name = $coreConfigRepository->getNameField($nameKey);
$value = $coreConfigRepository->getValueByRepository($field);
$validations = $coreConfigRepository->getValidations($field);
$channelLocaleInfo = $coreConfigRepository->getChannelLocaleInfo($field, $channel, $locale);
@endphp
@if ($field['type'] == 'depends')
@include('admin::configuration.dependent-field-type')
@else
@if ($field['type'] == 'text')
@elseif ($field['type'] == 'password')
@elseif ($field['type'] == 'number')
@elseif ($field['type'] == 'color')
@elseif ($field['type'] == 'textarea')
@elseif ($field['type'] == 'editor')
@elseif ($field['type'] == 'select')
@elseif ($field['type'] == 'multiselect')
@elseif ($field['type'] == 'country')
@php $countryCode = core()->getConfigData($nameKey, $channel, $locale) ?? ''; @endphp
@elseif ($field['type'] == 'state')
@php $stateCode = core()->getConfigData($nameKey, $channel, $locale) ?? ''; @endphp
@elseif ($field['type'] == 'boolean')
@php $selectedOption = core()->getConfigData($nameKey, $channel, $locale) ?? ($field['default_value'] ?? ''); @endphp
@elseif ($field['type'] == 'image')
@php
$src = Storage::url(core()->getConfigData($nameKey, $channel, $locale));
$result = core()->getConfigData($nameKey, $channel, $locale);
@endphp
@if ($result)
@endif
@if ($result)
{{ __('admin::app.configuration.delete') }}
@endif
@elseif ($field['type'] == 'file')
@php
$result = core()->getConfigData($nameKey, $channel, $locale);
$src = explode("/", $result);
$path = end($src);
@endphp
@if ($result)
@endif
@if ($result)
{{ __('admin::app.configuration.delete') }}
@endif
@endif
@if (isset($field['info']))
{{!! trans($field['info']) !!}}
@endif
@if ($field['type'] == 'multiselect')
@{{ errors.first('{!! $name !!}[]') }}
@else
@{{ errors.first('{!! $name !!}') }}
@endif
@endif
@push('scripts')
@if ($field['type'] == 'country')
@endif
@endpush
@pushonce('scripts')
@include('admin::layouts.tinymce')
@endpushonce