@extends('layout.v3.session')
@section('content')

    <form method="POST" action="{{ route('settings.links.destroy',$linkType->id) }}" accept-charset="UTF-8"
          class="form-horizontal" id="destroy">
        <input name="_token" type="hidden" value="{{ csrf_token() }}">
        <div class="row">
            <div class="col-lg-6 offset-lg-3 col-md-12 col-sm-12">
                <div class="card card-danger card-outline">
                    <div class="card-header">
                        <h3 class="card-title">{{ trans('form.delete_link_type', ['name' => $linkType->name]) }}</h3>
                    </div>
                    <div class="card-body">
                        <p class="text-danger">
                            {{ trans('form.permDeleteWarning') }}
                        </p>

                        <p>
                            {{ trans('form.linkType_areYouSure', ['name' => $linkType->name, 'inward' => $linkType->inward, 'outward' => $linkType->outward]) }}
                        </p>

                        @if($count > 0)
                            <p>
                                {{ trans_choice('form.also_delete_connections', $count, ['count' => $count]) }}
                            </p>
                        @endif
                        @if($count > 0)
                            <p class="text-success">
                                {{ __('firefly.save_connections_by_moving') }}
                            </p>

                            <p>
                                {!! Html::select('move_link_type_before_delete', $moveTo)->class('form-control') !!}
                            </p>
                        @else
                            <input type="hidden" name="move_link_type_before_delete" value="0"/>
                        @endif

                    </div>
                    <div class="card-footer text-end">
                        <input type="submit" name="submit" value="{{ trans('form.deletePermanently') }}"
                               class="btn btn-danger"/>
                        <a href="{{ URL::previous() }}" class="btn-outline-secondary btn">{{ trans('form.cancel') }}</a>
                    </div>
                </div>
            </div>
        </div>

    </form>
@endsection
@section('scripts')
    @vite(['js/pages/generic.js'])
@endsection
