<div class="pos-tab-content active">
    <div class="row">
        {{-- <div class="col-sm-3">
            <div class="form-group">
                {!! Form::label('walmart_enable', __('business.enable-disable') . ':') !!}
                <div class="checkbox">                    
                    <label>
                    {!! Form::radio('walmart_enable', '1',  $marketplace_settings['walmart_enable'] == 1 ? true : false, 
                        [ 'class' => 'input-iradio', 'onchange' => 'get_input(this.value, "walmart")']); !!} {{ __( 'business.enable' ) }}
                    {!! Form::radio('walmart_enable', '0',  $marketplace_settings['walmart_enable'] == 0 ? true : false, 
                        [ 'class' => 'input-iradio', 'onchange' => 'get_input(this.value, "walmart")']); !!} {{ __( 'business.disable' ) }}
                    
                    </label>
                </div>
            </div>
        </div> --}}
        {{-- <div class="col-sm-4">
            <div class="form-group">
                {!! Form::label('walmart_api_url', __('business.api_url') . ':') !!}
                {!! Form::text('walmart_api_url', $marketplace_settings['walmart_api_url'] ?? null, ['class' => 'form-control']); !!}
            </div>
        </div>
        <div class="col-sm-4">
            <div class="form-group">
                {!! Form::label('walmart_api_access_token', __('business.api_access_token') . ':') !!}
                {!! Form::text('walmart_api_access_token', $marketplace_settings['walmart_api_access_token'] ?? null, ['class' => 'form-control']); !!}
            </div>
        </div> --}}
        <div class="col-sm-3" id="location_walmart">
            <div class="form-group">
                {!! Form::label('product_locations_walmart', __('business.shipping_location') . ':') !!}
                {!! Form::select('product_locations_walmart[]', $business_locations, null, ['class' => 'form-control select2', 'id' => 'product_locations_walmart', 'style' => 'width: 100%']) !!}
            </div>
        </div>
        {{-- <div id="walmart_space"></div> --}}
        {{-- <div class="col-sm-4">
            <div class="form-group">
                {!! Form::label('walmart_api_key', __('business.api_key') . ':') !!}
                {!! Form::text('walmart_api_key', $marketplace_settings['walmart_api_key'] ?? null, ['class' => 'form-control']); !!}
            </div>
        </div>
        <div class="col-sm-4">
            <div class="form-group">
                {!! Form::label('walmart_api_secret', __('business.api_secret') . ':') !!}
                {!! Form::text('walmart_api_secret', $marketplace_settings['walmart_api_secret'] ?? null, ['class' => 'form-control']); !!}
            </div>
        </div> --}}
        <div class="col-sm-12">
            <div class="form-group">
                {!! Form::label('checkmarks_walmart', __('business.sync_items') . ':') !!}
                <div class="checkbox row">
                    <label for="">
                        @if($reference_checkmarks)
                            @foreach ($reference_checkmarks as $k => $item)
                                <div class="col-sm-6 mr-2">
                                    @if ($walmart_checkbox)   
                                        @php
                                            $checked = '';
                                        @endphp
                                        @foreach ($walmart_checkbox as $iw)                                            
                                            @if (in_array($item->reference_column, (array)$iw))                                        
                                                @php
                                                    $checked = 'checked';                                                
                                                @endphp                                            
                                            @endif                                                                                                            
                                        @endforeach                                                                    
                                        <input type="checkbox" name="checkmarks_walmart[]" class="input-checkbox" value="{{ $item->reference_column }}" id="checkmarks_walmart{{$k+1}}" {{$checked}}>{{$item->name}}                             
                                    @else
                                        <input type="checkbox" name="checkmarks_walmart[]" class="input-checkbox" value="{{ $item->reference_column }}" id="checkmarks_walmart{{$k+1}}">{{$item->name}}                                                                 
                                    @endif
                                </div>
                            @endforeach
                        @endif
                    </label>
                </div>
            </div>            
            <div class="form-group">
                <div class="box box-primary" id="accordion">
                    <div class="box-header with-border">
                      <h3 class="box-title">                        
                        <input type="radio" id="option_marketplace_1" name="option_marketplace_1" value="1" onclick="getOption(1, this.value, 1)" 
                        @if ($marketplace_option)                            
                            @if(property_exists($marketplace_option, 'first_option')) 
                                @if (count($marketplace_option->first_option) > 0)
                                    checked
                                @endif
                            @endif
                        @endif>
                        <label for="">Yes</label>                            
                        <input type="radio" id="option_marketplace_1" name="option_marketplace_1" value="0" onclick="getOption(1, this.value, 1)" 
                        @if ($marketplace_option)                            
                            @if(property_exists($marketplace_option, 'first_option')) 
                                @if (count($marketplace_option->first_option) == 0)
                                    checked
                                @endif
                            @else
                                checked
                            @endif
                        @else 
                            checked
                        @endif>
                        <label for="">No</label>                            
                        - @lang('messages.marketplace_option', ['marketplace' => 'Walmart'])                        
                      </h3>
                    </div>
                    <div id="option_marketplace_collapse_1" class="panel-collapse collapse" 
                    @if ($marketplace_option)                                                        
                        @if(property_exists($marketplace_option, 'first_option')) 
                            @if (count($marketplace_option->first_option) > 0)
                                style="display: block;"
                            @else 
                                style="display: none;"
                            @endif
                        @endif  
                    @endif aria-expanded="true">
                        <div class="box-body">
                            @php
                                $checked11 = null;
                                $checked12 = null;
                                $checked13 = null;
                                $checked14 = null;
                                @endphp                      
                            @if ($marketplace_option)
                                @if (property_exists($marketplace_option, 'first_option'))
                                    @foreach ($marketplace_option->first_option as $item)
                                        @if ($item == 11)
                                            @php                                        
                                                $checked11 = 'checked';
                                            @endphp                                        
                                        @endif
                                        @if ($item == 12)
                                            @php                                        
                                                $checked12 = 'checked';
                                            @endphp                                        
                                        @endif
                                        @if ($item == 13)
                                            @php                                        
                                                $checked13 = 'checked';
                                            @endphp                                        
                                        @endif
                                        @if ($item == 14)
                                            @php                                        
                                                $checked14 = 'checked';
                                            @endphp                                        
                                        @endif                                   
                                    @endforeach                            
                                @endif
                            @endif
                            <input type="checkbox" name="value_marketplace[first_option][]" class="input-checkbox" value="11" id="checkmarks_marketplace_11" {{$checked11}}>&nbsp;Create a product on my other marketplaces when I create a product on Walmart
                            <br>
                            <input type="checkbox" name="value_marketplace[first_option][]" class="input-checkbox" value="12" id="checkmarks_marketplace_12" {{$checked12}}>&nbsp;Create a product on Walmart if I create a product on my any other marketplace
                            <br>
                            <input type="checkbox" name="value_marketplace[first_option][]" class="input-checkbox" value="13" id="checkmarks_marketplace_13" {{$checked13}}>&nbsp;Update Walmart products if there is a change on my any marketplace product                            
                            <br>
                            <input type="checkbox" name="value_marketplace[first_option][]" class="input-checkbox" value="14" id="checkmarks_marketplace_14" {{$checked14}}>&nbsp;Update other market place products if there is a change on Walmart product
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="box box-primary" id="accordion">
                    <div class="box-header with-border">
                      <h3 class="box-title">                        
                        <input type="radio" id="option_marketplace_2" name="option_marketplace_2" value="1" onclick="getOption(2, this.value, 2)" 
                        @if ($marketplace_option)
                            @if(property_exists($marketplace_option, 'second_option')) 
                                @if (count($marketplace_option->second_option) > 0)
                                    checked
                                @endif
                            @endif
                        @endif>
                        <label for="">Yes</label>                            
                        <input type="radio" id="option_marketplace_2" name="option_marketplace_2" value="0" onclick="getOption(2, this.value, 2)" 
                        @if ($marketplace_option)
                            @if(property_exists($marketplace_option, 'second_option')) 
                                @if (count($marketplace_option->second_option) == 0)
                                    checked
                                @endif
                            @else
                                checked
                            @endif
                        @else 
                            checked
                        @endif>
                        <label for="">No</label>                            
                        - @lang('messages.marketplace_option2', ['marketplace' => 'Walmart'])                        
                      </h3>
                    </div>
                    <div id="option_marketplace_collapse_2" class="panel-collapse collapse" 
                    @if ($marketplace_option)
                        @if(property_exists($marketplace_option, 'second_option')) 
                            @if (count($marketplace_option->second_option) > 0)
                                style="display: block;"
                            @else 
                                style="display: none;"
                            @endif
                        @endif
                    @endif
                    aria-expanded="true">
                        <div class="box-body">
                            @php
                                $checked21 = null;
                                $checked22 = null;
                                $checked23 = null;
                                $checked24 = null;
                                @endphp                      
                            @if ($marketplace_option)
                                @if (property_exists($marketplace_option, 'second_option'))
                                    @foreach ($marketplace_option->second_option as $item)
                                        @if ($item == 21)
                                            @php                                        
                                                $checked21 = 'checked';
                                            @endphp                                        
                                        @endif
                                        @if ($item == 22)
                                            @php                                        
                                                $checked22 = 'checked';
                                            @endphp                                        
                                        @endif
                                        @if ($item == 23)
                                            @php                                        
                                                $checked23 = 'checked';
                                            @endphp                                        
                                        @endif
                                        @if ($item == 24)
                                            @php                                        
                                                $checked24 = 'checked';
                                            @endphp                                        
                                        @endif                                   
                                    @endforeach                            
                                @endif                     
                            @endif                     
                            <input type="checkbox" name="value_marketplace[second_option][]" class="input-checkbox" value="21" id="checkmarks_marketplace_21" {{$checked21}}>&nbsp;Create a product on my active ecommerce store when i create a product on Walmart
                            <br>
                            <input type="checkbox" name="value_marketplace[second_option][]" class="input-checkbox" value="22" id="checkmarks_marketplace_22" {{$checked22}}>&nbsp;Create a product on Walmart if I create a product on my active ecommerce store
                            <br>
                            <input type="checkbox" name="value_marketplace[second_option][]" class="input-checkbox" value="23" id="checkmarks_marketplace_23" {{$checked23}}>&nbsp;Update Walmart products if there is a change on active ecommerce side
                            <br>
                            <input type="checkbox" name="value_marketplace[second_option][]" class="input-checkbox" value="24" id="checkmarks_marketplace_24" {{$checked24}}>&nbsp;Update active ecommerce products if there is a change on walmart side
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>