

@if(auth(activeGuard())->user()->can("order-set-status"))
    <div class="dropdown mb-4">
        <button class="btn btn-light dropdown-toggle" type="button" id="dropdownMenuButton"
                data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
            {!! $order->status->badge_dot ?? $status->name ?? "--" !!}
        </button>

        @if(!in_array($order->status_code,$rejectedStatuses))
            <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
                @forelse($nextStatuses as $status)
                    <a class="dropdown-item order-set-status-to" href="javascript:void(0);"
                       data-status-id="{{$status->id}}"
                       data-order-id="{{$order->id}}"
                       data-bagde-dot="{{$status->dot ?? "--"}}"
                       data-confirm-message="{{__("Set ':orderId' to :status",["status" => $status->name,'orderId' => $order->ref_id])}}">
                        {!! $status->badge_dot ?? $status->name ?? "--" !!}
                    </a>
                @empty
                @endforelse
            </div>
        @endif

    </div>
@else
 {!! $order->status->badge_label !!}
@endif

