@extends('layout.default') @if($mode == 'edit') @section('title', $__t('Edit shopping list item')) @else @section('title', $__t('Create shopping list item')) @endif @section('viewJsName', 'shoppinglistitemform') @section('content')

@yield('title')

@if($mode == 'edit') @endif
@if(GROCY_FEATURE_FLAG_SHOPPINGLIST_MULTIPLE_LISTS)
@else @endif @php if($mode == 'edit') { $productId = $listItem->product_id; } else { $productId = ''; } @endphp @include('components.productpicker', array( 'products' => $products, 'nextInputSelector' => '#amount', 'isRequired' => false, 'prefillById' => $productId )) @php if($mode == 'edit') { $value = $listItem->amount; } else { $value = 1; } @endphp @include('components.numberpicker', array( 'id' => 'amount', 'label' => 'Amount', 'hintId' => 'amount_qu_unit', 'min' => 0, 'value' => $value, 'invalidFeedback' => $__t('The amount cannot be lower than %s', '1') ))
@include('components.productcard')
@stop