@php $t = $ticket ?? null; @endphp
<div class="row">
    <div class="col-md-12">
        <div class="form-group">
            {!! Form::label('subject', 'Subject:*') !!}
            {!! Form::text('subject', $t->subject ?? null, ['class' => 'form-control', 'required']) !!}
        </div>
    </div>
</div>
<div class="row">
    <div class="col-md-4">
        <div class="form-group">
            {!! Form::label('category', 'Category:') !!}
            {!! Form::select('category', [
                'complaint' => 'Complaint',
                'query'     => 'Query',
                'warranty'  => 'Warranty',
                'feedback'  => 'Feedback',
                'other'     => 'Other',
            ], $t->category ?? null, ['class' => 'form-control', 'placeholder' => __('messages.please_select')]) !!}
        </div>
    </div>
    <div class="col-md-4">
        <div class="form-group">
            {!! Form::label('priority', 'Priority:') !!}
            {!! Form::select('priority', [
                'low'    => 'Low',
                'normal' => 'Normal',
                'high'   => 'High',
                'urgent' => 'Urgent',
            ], $t->priority ?? 'normal', ['class' => 'form-control']) !!}
        </div>
    </div>
    <div class="col-md-4">
        <div class="form-group">
            {!! Form::label('status', __('vrc::lang.status') . ':') !!}
            {!! Form::select('status', collect($statuses)->mapWithKeys(fn ($s) => [$s => ucfirst(str_replace('_', ' ', $s))])->toArray(), $t->status ?? 'open', ['class' => 'form-control']) !!}
        </div>
    </div>
</div>
@isset($t)
<div class="row">
    <div class="col-md-6">
        <div class="form-group">
            {!! Form::label('assigned_to', 'Assigned To:') !!}
            {!! Form::text('assigned_to', $t->assigned_to ?? null, ['class' => 'form-control']) !!}
        </div>
    </div>
</div>
@endisset
<div class="form-group">
    {!! Form::label('description', 'Description:') !!}
    {!! Form::textarea('description', $t->description ?? null, ['class' => 'form-control', 'rows' => 3]) !!}
</div>
