@if ($is_mobile)
@if (count($shapes = get_body_shapes()))
@foreach ($shapes as $shape)
@endforeach
@endif
@endif
@if (count($templateDetail->itemConfigs))
@foreach ($templateDetail->itemConfigs as $item)
@php
$previewConfig = $item->preview_config;
$width = $previewConfig['width'] && $previewConfig['width'] > 0?$previewConfig['width']:1;
$height = $previewConfig['height'] && $previewConfig['height'] > 0?$previewConfig['height']:1;
$ratio = $height/$width * 100;
@endphp
@php
$oldItemId = old('items.'.$item->id, 0);
@endphp
@if (is_mobile())
@if (count($item->templateItems))
@foreach ($item->templateItems as $tempItem)
@endforeach
@endif
@else
@if (count($item->templateItems))
@foreach ($item->templateItems as $tempItem)
@endforeach
@endif
@endif
@if ($errors->has('items.'.$item->id))
{{$errors->first('items.'.$item->id)}}
@endif
@php
$attr_values = $style && is_array($style->set_data) &&
($set_data = $style->set_data) &&
array_key_exists('attr_values', $set_data) &&
is_array($set_data['attr_values']) &&
array_key_exists($item->id, $set_data['attr_values']) ?
array_values($set_data['attr_values'][$item->id]) : [];
@endphp
@include($_current.'attributes', [
'attributes' => $item->attributes,
'item_id' => $item->id,
'attr_values' => $attr_values
])
@endforeach
@if ($errors->has('items'))
{{$errors->first('items')}}
@endif
@endif