<div class="modal-dialog" role="document">
	<div class="modal-content">
		<div class="modal-header">
			<button type="button" class="close no-print" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
			<h4 class="modal-title" id="modalTitle">Rule Based Print Settings</h4>
		</div>
		<div class="modal-body">
    {!! Form::open(['url' => action([\App\Http\Controllers\BarcodeController::class, 'StoreRuleBasedPrintSettings']), 'method' => 'post', 
      'id' => 'rule_based_print_settings_form','class' => 'product_form ' , 'files' => true ]) !!}
      <input type="hidden" name="row_count" id="row_count" value="{{count($data)}}">    
      <div class="row" id="rule_based_print_settings_rows">    
        <div class="col-lg-12">
          <div class="form-group">
            {!! Form::label('', __('messages.add') . '') !!}
            <button type="button" class="btn btn-default bg-white btn-flat btn-modal" title="Add subject" onclick="addRuleBasedPrintSettings()"><i class="fa fa-plus-circle text-primary fa-lg"></i></button>
            <div class="input-group">              
              <span class="input-group-btn">
              </span>
            </div>
          </div>
        </div>
        @if(!empty($data))          
          @foreach($data as $k => $d)
            @php
              $key = $k+1;
            @endphp
            <section id="row_rule_based{{$k+1}}">
              <div class="col-lg-6">
                <div class="form-group">
                  {!! Form::label('decimal_point', __('barcode.decimal_point') . '') !!}
                  {!! Form::text("rule_based[$key][decimal_point]", $d->decimal_point, ['class' => 'form-control', '']); !!}
                </div>
              </div>
              <div class="col-lg-6">
                <div class="form-group">
                  {!! Form::label('price_on_print_label', __('barcode.price_on_print_label') . '') !!}
                  <div class="input-group">
                    {!! Form::text("rule_based[$key][price_on_print_label]", $d->price_on_print_label, ['class' => 'form-control', '']); !!}
                    <span class="input-group-btn">
                        <button type="button" class="btn btn-default bg-white btn-flat btn-modal" title="Remove subject" onclick="removeRuleBasedPrintSettings('#row_rule_based{{$k+1}}')"><i class="fa fa-times-circle text-danger fa-lg"></i></button>
                    </span>
                  </div>                  
                </div>
              </div>
            </section>
          @endforeach        
        @endif
      </div>
    {!! Form::close() !!}
    </div>
    <div class="modal-footer">
			<button type="button" class="btn btn-primary"
				aria-label="save" onclick="submitRuleBased(event)">
				<i class="fa fa-save"></i> @lang( 'messages.save' )
			</button>
			<button type="button" class="btn btn-default no-print" data-dismiss="modal">@lang( 'messages.close' )</button>
		</div>
	</div>
</div>