{!! Form::open(['action' => route('admin_promotion_detail', [$data['promotion_id']]), 'class' => 'modal-content form-prevent-multiple-submits', 'enctype' => 'multipart/form-data']) !!}
    <div class="modal-header">
        <h5 class="modal-title">
            {{ __('Produkt') }} <span class="font-weight-light">hinzufügen / bearbeiten</span>
            <span class="font-weight-light">hinzufügen</span>
        </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
    </div>
    <div class="modal-body">
        <input type="hidden" name="action" value="{{$data['action']}}">
        <input type="hidden" name="id" value="{{$data['id']}}">

        
        <div class="form-row">
            <div class="form-group col-md-12">
                <label for="country_ids" class="form-label">{{__('Produkt')}}</label>
                <select class="selectpicker" name="product_id" id="product_id"  data-style="btn-light" data-live-search="true" required>                          
                  {!! HTMLHelper::getProductsOptions([$value->product_id], true) !!}
                </select>
            </div>
        </div>
        <div class="form-row">
            <div class="form-group col-sm-6">
                <label class="custom-control custom-checkbox mt-2">
                    {!! Form::checkbox('shipping', 1, $value->shipping, ['class'=>'custom-control-input']) !!}
                    <span class="custom-control-label">Versandkosten für dieses Produkt berechnen</span>
                </label>
            </div>
            <div class="form-group col-sm-6">
                <label class="custom-control custom-checkbox mt-2">
                    {!! Form::checkbox('active', 1, $value->active, ['class'=>'custom-control-input']) !!}
                    <span class="custom-control-label">Produkt aktiv</span>
                </label>
            </div>   
        </div>
        <div class="form-row">
            <div class="form-group col-sm-12">
                <label class="custom-control custom-checkbox mt-2">
                    {!! Form::checkbox('calcu_commission', 1, $value->calcu_commission, ['class'=>'custom-control-input']) !!}
                    <span class="custom-control-label">Provision der User-Rolle vom Preis abziehen</span>
                </label>
            </div>

            <div class="form-group col-sm-12">
                <hr class="mt-0">
                <label class="custom-control custom-checkbox mt-2">
                    {!! Form::checkbox('own_price', 1, $value->own_price, ['class'=>'custom-control-input']) !!}
                    <span class="custom-control-label">Neuer Preis (sonst wird der eingestellte Produktpreis genommen)</span>
                </label>                
                {{ Form::text('price', $value->getFormattedPrice(),  array('placeholder'=>__('Neuer Preis in Euro / Brutto'), 'class'=>'form-control', 'id'=>'price')) }}
            </div>

            <div class="form-group col-sm-12">
                <hr class="mt-0">

                <label class="form-label" for="max_items">{{ __('Max. Produkte für diese Promotion') }}</label>
                {{ Form::text('max_items', $value->max_items,  array('placeholder'=>__('Einheiten in Stück'), 'class'=>'form-control', 'id'=>'max_items')) }}
            </div>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
        <button type="submit" class="btn btn-primary button-prevent-multiple-submits">{{__('save')}}</button>

    </div>
{!! Form::close() !!}

<script type="text/javascript">
    $( document ).ready(function() {

    });
</script>
