@extends('agency.layouts.app')
@section('title', 'Yeni Satış')
@section('page_title', 'Yeni Satış')

@include('agency.sales.create.styles')

@section('content')
    <div class="container-fluid">

        <div class="d-flex align-items-center gap-2 mb-3" style="font-size:.82rem;color:#94a3b8">
            <a href="{{ route('agency.sales.index') }}" style="color:#6366f1;text-decoration:none;font-weight:600"><i
                    class="fas fa-shopping-bag me-1"></i>Satışlar</a>
            <i class="fas fa-chevron-right" style="font-size:9px"></i>
            <span style="color:var(--text);font-weight:600">Yeni Satış Kaydı</span>
        </div>

        @if($errors->any())
            <div class="alert alert-danger border-0 shadow-sm mb-3" style="border-radius:12px;font-size:.84rem">
                <ul class="mb-0 ps-3">@foreach($errors->all() as $e)<li>{{ $e }}</li>@endforeach</ul>
            </div>
        @endif

        <form method="POST" action="{{ route('agency.sales.store') }}" id="resForm">
            @csrf
            <div class="rform-wrap">
                <div class="row g-4">
                    <div class="col-lg-8">
                        @include('agency.sales.create.product_type')
                        @include('agency.sales.create.product_selection')
                        @include('agency.sales.create.date_selection')
                        @include('agency.sales.create.customer_selection')
                        @include('agency.sales.create.counts_and_locations')
                        @include('agency.sales.create.passenger_forms')
                        @include('agency.sales.create.extra_fields')
                        @include('agency.sales.create.notes')
                    </div>{{-- col-lg-8 --}}

                    <div class="col-lg-4">
                        @include('agency.sales.create.sidebar')
                    </div>{{-- col-lg-4 --}}
                </div>{{-- row --}}

                <div class="form-footer mt-1">
                    <a href="{{ route('agency.sales.index') }}" class="btn btn-outline-secondary"
                        style="border-radius:9px"><i class="fas fa-times me-1"></i>İptal</a>
                    <button type="submit" class="btn text-white"
                        style="background:linear-gradient(135deg,#2563eb,#1e40af);border-radius:11px;padding:.6rem 2.5rem;font-weight:700;box-shadow:0 4px 14px rgba(37,99,235,.4)"><i
                            class="fas fa-save me-2"></i>Satış Kaydını Tamamla</button>
                </div>

            </div>{{-- rform-wrap --}}
        </form>
    </div>{{-- container --}}

    @include('agency.sales.create.modals')
@endsection

@include('agency.sales.create.scripts')