@if(\App\Facades\General::isSchoolAdmin() || \App\Facades\General::isSuperAdmin())
@if(isset($ajax) && $ajax == true)
    <button class="btn btn-danger btn-xs __sms__delete__record"
            data-id="{{ $model->id }}"
            style="margin: 0;"
            title="{{ trans('common.delete') }}">
        <i class="fa fa-trash-o "></i>
    </button>
@else
    @if(!isset($message))
        @php
            $message = trans('common.delete_alert')
        @endphp
    @endif
    {!! Form::open(['name'=>'delete','method'=> 'delete','class'=> 'btn btn-sm btn-clean btn-icon btn-icon-md', 'style' => 'padding: 0;border: 0;' , 'route' => [$route, $model->id] ]) !!}
    <button class="btn btn-danger btn-xs" style="margin: 0;"
            onclick="if (confirm('{{ $message }}')) { $(this).closest('form').submit(); }"
            title="{{ trans('common.delete') }}">
        <i class="fa fa-trash-o "></i>
    </button>
    {!! Form::close() !!}
@endif
@endif
