<!-- $o=Service\Domain::class -->

<div class="card">
	<x-ribbons.change :change="$o->service->is_pending_change"/>
	<x-ribbons.pending :pending="$o->service->is_pending_active"/>

	<div class="card-header bg-gray-dark">
		<h3 class="card-title">Domain Details</h3>
	</div>

	<div class="card-body bg-gray-dark">
		<table class="table table-sm">
			<tr>
				<th>Domain Name</th>
				<td>{{ $o->service->name }}</td>
			</tr>
			@if($o->registrar)
				<tr>
					<th>Registrar URL</th>
					<td><a href="{{ $o->registrar->whitelabel_url }}" target="_blank" class="text-white">{{ $o->registrar->whitelabel_url }}</a></td>
				</tr>
				<tr>
					<th>Registrar Username</th>
					<td>{{ $o->registrar_username }}</td>
				</tr>
				<tr>
					<th>Registrar Password</th>
					<td>{{ $o->registrar_password }}</td>
				</tr>
				<tr>
					<th>Domain Auth</th>
					<td>{{ $o->registrar_auth_password }}</td>
				</tr>
			@endif
			@if($o->service_connect_date)
				<tr>
					<th>Connected</th>
					<td>{{ $o->service_connect_date->format('Y-m-d') }}</td>
				</tr>
			@endif

			@if ($o->active)
				<tr>
					<th>Expires</th>
					<td>{{ $o->expire_at->format('Y-m-d') }} <small>({{ $o->expire_at->diffInMonths() }} months) </small></td>
				</tr>
			@endif
		</table>
	</div>
</div>