@extends('admin.layouts.app')

@section('title', __('admin/network-tools.dns_title'))

@section('content')
<div class="container-fluid px-4">
    <x-admin.page-header :title="__('admin/network-tools.dns_title')" icon="fas fa-server" />

    <x-admin.card :title="__('admin/network-tools.dns_title')" icon="fas fa-server">
        <form id="dnsForm">
            <div class="row">
                <div class="col-md-6">
                    <div class="mb-3">
                        <label for="dns_domain" class="form-label">{{ __('admin/network-tools.dns_domain') }}</label>
                        <input type="text" class="form-control" id="dns_domain" name="domain"
                               placeholder="{{ __('admin/network-tools.dns_domain_placeholder') }}" required>
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="mb-3">
                        <label for="dns_type" class="form-label">{{ __('admin/network-tools.dns_type') }}</label>
                        <select class="form-select" id="dns_type" name="type">
                            <option value="A">A</option>
                            <option value="AAAA">AAAA</option>
                            <option value="CNAME">CNAME</option>
                            <option value="MX">MX</option>
                            <option value="TXT">TXT</option>
                            <option value="NS">NS</option>
                            <option value="SOA">SOA</option>
                            <option value="PTR">PTR</option>
                        </select>
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="mb-3">
                        <label class="form-label">&nbsp;</label>
                        <button type="submit" class="btn btn-warning w-100">
                            <i class="fas fa-search me-1"></i>
                            {{ __('admin/network-tools.dns_search') }}
                        </button>
                    </div>
                </div>
            </div>
        </form>

        <div id="dnsResult" class="mt-4" style="display: none;">
            <x-admin.card :title="__('admin/network-tools.dns_result')" icon="fas fa-info-circle">
                <div id="dnsOutput"></div>
            </x-admin.card>
        </div>
    </x-admin.card>
</div>
@endsection

@push('scripts')
@vite('resources/js/admin/network-tools/dns.js')
@endpush
