@extends('layouts.admin')
@section('content')
<div class="page-header"><div class="page-block"><div class="row align-items-center">
    <div class="col-md-12"><ul class="breadcrumb"><li class="breadcrumb-item"><a href="{{ route('admin.dashboard') }}">হোম</a></li><li class="breadcrumb-item"><a href="javascript: void(0)">সেটিংস</a></li><li class="breadcrumb-item" aria-current="page">Ads / Create</li></ul></div>
    <div class="col-md-12"><div class="page-header-title"><h2 class="mb-0">{{ __('Create Advertisement') }}</h2></div></div>
</div></div></div>

@include('includes.admin.form-error')
@include('includes.admin.form-success')

<form id="geniusformdata" action="{{ route('ads.store')}}" method="POST" enctype="multipart/form-data">
    {{csrf_field()}}
    <div class="card">
        <div class="card-header"><h5>{{ __('Advertisement Details') }}</h5></div>
        <div class="card-body">
            <div class="row">
                <div class="col-md-6 mb-3">
                    <label class="form-label">{{ __('Placements') }} <span class="text-danger">*</span></label>
                    <select name="add_placement" id="placement" class="form-control">
                        <option value="">{{__('Please Select a Placements')}}</option>
                        <option value="header">{{__('Header')}}</option>
                        <option value="index_bottom">{{__('Index Bottom')}}</option>
                        <option value="sidebar_bottom">{{__('Sidebar Bottom')}}</option>
                        <option value="sponsor">{{__('Sponsor Ads')}}</option>
                    </select>
                </div>
                <div class="col-md-6 mb-3">
                    <label class="form-label">{{ __('Banner Size') }} <span class="text-danger">*</span></label>
                    <select name="addSize" id="banner_size" class="form-control">
                        <option value="">{{__('Please Select a Banner Size')}}</option>
                        <option value="size_728">{{__('Size 728x90')}}</option>
                        <option value="size_468">{{__('Size 468x60')}}</option>
                        <option value="size_234">{{__('Size 234x60')}}</option>
                    </select>
                </div>
                <div class="col-md-6 mb-3">
                    <label class="form-label">{{ __('Banner') }} <span class="text-danger">*</span></label>
                    <select name="banner_type" id="banner" class="form-control">
                        <option value="">{{__('Please Select a Options')}}</option>
                        <option value="image">{{__('Banner from Image')}}</option>
                        <option value="code">{{__('Banner From code')}}</option>
                    </select>
                </div>
                <div class="col-md-6 mb-3">
                    <label class="form-label">{{__('Status')}} <span class="text-danger">*</span></label>
                    <div class="mt-2">
                        <div class="form-check form-check-inline">
                            <input class="form-check-input" type="radio" name="status" value="1" id="enable">
                            <label class="form-check-label" for="enable">{{__('Enable')}}</label>
                        </div>
                        <div class="form-check form-check-inline">
                            <input class="form-check-input" type="radio" name="status" value="0" id="disable" checked>
                            <label class="form-check-label" for="disable">{{__('Disable')}}</label>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row code" style="display:none;">
                <div class="col-12 mb-3">
                    <label class="form-label">{{ __('Banner Code') }} <span class="text-danger">*</span></label>
                    <textarea class="form-control banner_code" name="banner_code" id="banner_code" rows="4" placeholder="Your Script *"></textarea>
                </div>
            </div>

            <div class="row image" style="display:none;">
                <div class="col-md-6 mb-3">
                    <label class="form-label">{{__('Banner Image')}} <span class="text-danger">*</span></label>
                    <div class="img-upload">
                        <div id="image-preview" class="img-preview" style="background: url({{ asset('assets/admin/images/upload.png') }});">
                            <label for="image-upload" class="img-label" id="image-label"><i class="ti ti-upload"></i> Upload</label>
                            <input type="file" name="photo" class="img-upload" id="image-upload">
                        </div>
                    </div>
                    <p class="text-muted small mt-1">Homepage: 720x90 preferred | Sidebar: 468x60 preferred</p>
                </div>
            </div>

            <div class="row link" style="display:none;">
                <div class="col-md-6 mb-3">
                    <label class="form-label">{{__('Link')}} <span class="text-danger">*</span></label>
                    <input type="text" class="form-control" name="link" placeholder="{{ __('Enter link(ex:example.com)') }}" id="link" autocomplete="off">
                </div>
            </div>
        </div>
    </div>
    <div class="card"><div class="card-body">
        <button class="btn btn-primary" type="submit"><i class="ti ti-device-floppy me-1"></i>{{ __('Create Ads') }}</button>
    </div></div>
</form>
@endsection
@section('scripts')
<script src="{{asset('assets/admin/js/ads.js')}}"></script>
@endsection
