<div>

    <div class="row">
        @foreach($scriptdata as $product)
            <div class="col-xl-4 col-lg-6 col-md-6 col-sm-12 wow fadeInUp">
                <div style="cursor: pointer;border-radius: 3px;border: 1px solid rgba(128,128,128,0.17)" class="product-one__single">

                    <div style="cursor: pointer;border:7px solid #f7f7fc;border-radius: 1px" class="product-one__image" onclick="window.location.href='{{route('script.detay',$product->baslik_slug)}}'">
                        <a href="{{route('script.detay',$product->baslik_slug)}}">
                            <img class="lazyload scriptlistresim mt-2" src="{{asset('upload/loading.gif')}}" data-src="{{asset($product->resimyol)}}" alt="{{$product->resimyol_alt}}">
                        </a>

                        <!-- Kampanya etiketi -->

                    </div><!-- /.blog-one__image -->

                    @if(!$product->kampanya_tipi=="")
                        <div onclick="window.location.href='{{route('script.detay',$product->baslik_slug)}}'" style="cursor: pointer" class="product-one__badge">
                                <span>
                                    {{$product->kampanya_tipi}}
                                </span>
                        </div>
                    @endif

                    <div class="product-one__content">
                        <div onclick="window.location.href='{{route('script.detay',$product->baslik_slug)}}'" style="cursor: pointer">
                            <h3 class="text-center"><a href="{{route('script.detay',$product->baslik_slug)}}">{{$product->baslik}}</a></h3>

                            <div class="showcase-box-price product-one__meta">
                                @if(!$product->eski_fiyat=="")
                                    <div class="showcase-box-price-t-old">{{$product->eski_fiyat}}₺</div>
                                    <div class="showcase-box-price-t">
                                        <a href="{{route('script.detay',$product->baslik_slug)}}">{{$product->fiyat}}₺</a>

                                    </div>

                                @else

                                    <div class="showcase-box-price-t-old"></div>

                                    <div style="margin-top:10px;margin-bottom: 10px" class="showcase-box-price-t pt-1">
                                        <a href="{{route('script.detay',$product->baslik_slug)}}">{{$product->fiyat}}₺</a>

                                    </div>
                                @endif

                            </div>
                        </div>



                        <div class="text-center mt-3">

                            @if($sabitalanlar->lisans_input_zorunlu==1)

                                <div class="text-center mt-3">
                                    <a style="padding: 2px 20px" href="http://127.0.0.1:8000/yazilim/nakliye-web-sitesi-v3" class="thm-btn product-one__btn"><span><i class="fa fa-arrow-right"></i> Yazılım İncele</span></a>

                                </div>

                            @else
                                <a href="{{route('script.detay',$product->baslik_slug)}}" class="thm-btn product-one__btn2"><span><i class="fa fa-arrow-right"></i> Detay</span></a>
                                <a style="margin-left: 20px" href="" wire:click.prevent="addToCart({{$product->id}},'{{$product->baslik}}',{{$product->fiyat}})" class="thm-btn product-one__btn addToCart" data-product-id="{{$product->id}}"><span><i class="fa fa-shopping-cart"></i> Sepete Ekle</span></a>

                            @endif
                        </div>
                        <!-- /.thm-btn blog-one__btn -->
                    </div><!-- /.blog-one__content -->
                </div><!-- /.blog-one__single -->
            </div><!-- /.col-lg-4 col-md-6 col-sm-12 -->
        @endforeach

    </div>

    <div class="row">
        {{ $scriptdata->links('pagination.custom', ['language' => 'tr']) }}

    </div>


    @once
        <script>
            window.addEventListener('islembasarili', function(e) {


                let data = e.detail;
                let title = data.title;
                let message = data.message;
                let type = data.type;


                iziToast.show({
                    title: title,
                    message: message,
                    color: 'green',
                    position: 'bottomRight', // bottomRight, bottomLeft, topRight, topLeft, topCenter, bottomCenter, center
                    timeout: 3000,

                });





            });





        </script>






    @endonce

</div>

