@extends('layouts.app')

@section('title', 'Add Asset')

@section('container-class', 'ams-container--narrow')

@section('content')
    <x-page-header
        title="Add Asset"
        subtitle="The asset tag is generated automatically once you save.">
        <x-slot:breadcrumbs>
            <li class="breadcrumb-item"><a href="{{ route('assets.index') }}">Assets</a></li>
            <li class="breadcrumb-item active" aria-current="page">Add</li>
        </x-slot:breadcrumbs>
    </x-page-header>

    <div class="row">
        <div class="col-xl-9">
            <div class="card">
                <div class="card-body p-4">
                    <form method="POST" action="{{ route('assets.store') }}" enctype="multipart/form-data" novalidate>
                        @csrf

                        @include('assets._form', [
                            'asset' => $asset,
                            'editing' => false,
                            'categories' => $categories,
                            'locations' => $locations,
                            'teams' => $teams,
                            'manufacturerSuggestions' => $manufacturerSuggestions,
                            'vendorSuggestions' => $vendorSuggestions,
                        ])

                        <div class="ams-form-actions">
                            <button type="submit" class="btn btn-primary">
                                <i class="bi bi-check2" aria-hidden="true"></i>Add Asset
                            </button>
                            <a href="{{ route('assets.index') }}" class="btn btn-ghost">Cancel</a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
@endsection
