@extends('layouts.admin')
@section('title', 'New ' . $typeLabel)
@section('page-title', 'Add New ' . $typeLabel)

@section('content')
@if(!empty($emptyVendors))
    <div class="card billing-form-card border-0">
        <div class="card-body billing-empty py-5">
            <div class="billing-empty__icon"><i class="ri-store-2-line"></i></div>
            <h5 class="mb-2">Add a vendor first</h5>
            <p class="text-muted mb-3">You need at least one vendor before creating a {{ strtolower($typeLabel) }}.</p>
            <a href="{{ route('admin.vendors.create') }}" class="btn btn-success">Add Vendor</a>
            <a href="{{ route('admin.purchase-orders.index') }}" class="btn btn-light ms-2">Back</a>
        </div>
    </div>
@else
    @include('admin.purchase-orders._form')
@endif
@endsection
