@extends('admin.layouts.container')

@section('content')
    <div class="side-title">
        <h3>{{ $head ?? ''}}</h3>
    </div>

    <div class="border-item">
        <!-- Hidden master input to clone from -->
        <input type="file" id="fileTemplate" name="images[]" accept="image/*" style="display: none;" />
        <form class="form-row" method="post" onsubmit="saveForm(this)" action="{{ $action }}" enctype="multipart/form-data">
            @csrf

            <div class="border-item photos col-md-12 other_image_container">
                <div class="row" id="imageContainer">
                    @foreach ($brands as $photo)
                        <div class="col-md-4">
                            <div class="items">
                                <div class="img">
                                    <a href="{{ $photo->image_url}}" data-fancybox="gallery"><img src="{{ $photo->image_url}}" alt=""></a>
                                </div>
                                <input type="hidden" name="old_images[]" value="{{ $photo->image ?? "" }}">
                                <a href="#" class="close remove-image"><i class="fas fa-times"></i></a>
                            </div>
                        </div>
                    @endforeach
                </div>
                <div class="text-center">
                    <div class="clearfix"></div>
                    <span id="add">
                        <a class="add" id="addImage"> {{__('brands.add_photos')}} </a>
                    </span>
                </div>
            </div>

            <div class="text-center mt-5 col-12">
                <button class="butn"><span>{{ __('dashboard.save') }}</span></button>
            </div>
        </form>
    </div>

@endsection

@section('inner_js')
@endsection



