<div class="row">
    <div class="col-md-6 text-left pt-1 mb-3">
        <div class="col-12">
            <div class="media pt-1">
                <img src="/images/logo.png" alt="company logo" width="100" class="" />
            </div>
        </div>
    </div>

    <div class="col-md-6 text-right pt-1 mb-3">
        @if (
            (!empty(auth()->user()->role->permissions['order_status']['replacement']) && $order->status == 'replacement') ||
                (!empty(auth()->user()->role->permissions['order_status']['closed']) && $order->status == 'replacement'))
            <a href="{{ route('dashboard.orders.edit', $order->id) }}" class="btn btn-primary">
                <i class="fa fa-edit"></i> Редактировать
            </a>
        @endif

        @if (!empty(auth()->user()->role->permissions['orders']['print']))
            <a href="{{ route('dashboard.invoice_print', $order->id) }}" target="_blank" class="btn btn-success">
                <i class="fa fa-print"></i> Печатать
            </a>
        @endif

        <a href="{{ route('dashboard.orders.archive', $order->id) }}" class="btn btn-secondary">
            <i class="feather icon-box"></i>
            @if ($order->archived == 1)
                @lang('admin.orders.unarchive')
            @else
                @lang('admin.orders.archive')
            @endif
        </a>

        <a href="{{ $order->contracts()->latest()->first()?->getPath() }}" class="btn btn-primary">
            <i class="feather icon-download"></i>
            @lang('admin.Download contract')
        </a>
    </div>
</div>
