<div class="row">
    @if ($target->status == 'Pending')
    <div class="col-12" id="deposit-alert">
        <div class="alert alert-info">
            <i class="fa fa-info-circle"></i> <b>Info:</b> Deposit anda segera diproses, lunasi pembayaran anda.
        </div>
    </div>
    @endif
	<div class="form-group col-lg-12">
		<label>ID</label>
		<div class="input-group">
			<input type="text" class="form-control" value="{!! $target->id !!}" id="data-id-{{ $target->id }}" readonly>
			<div class="input-group-append">
				<button class="btn btn-dark" type="button" onclick="copy('data-id-{{ $target->id }}')"><i class="fa fa-copy fa-fw"></i> Salin</button>
			</div>
		</div>
	</div>
	<div class="form-group col-lg-6">
		<label>Tanggal/Waktu Dibuat</label>
		<span class="form-control">
			{{ \Carbon\Carbon::parse($target->created_at)->translatedFormat('d F Y - H:i') }}
			({{ \Carbon\Carbon::parse($target->created_at)->diffForHumans() }})
		</span>
	</div>
	<div class="form-group col-lg-6">
		<label>Tanggal/Waktu Diperbarui</label>
		<span class="form-control">
			{{ \Carbon\Carbon::parse($target->updated_at)->translatedFormat('d F Y - H:i') }}
			({{ \Carbon\Carbon::parse($target->updated_at)->diffForHumans() }})
		</span>
	</div>
	<div class="form-group col-lg-12">
		<label>Metode</label>
		<div class="input-group">
			<input type="text" class="form-control" value="{!! $target->deposit_method == true ? ''.$target->deposit_method->name.' ('.$target->deposit_method->payment.' - '.$target->deposit_method->type.')' : $target->deposit_method_name !!}" id="data-method-{{ $target->id }}" readonly>
			<div class="input-group-append">
				<button class="btn btn-dark" type="button" onclick="copy('data-method-{{ $target->id }}')"><i class="fa fa-copy fa-fw"></i> Salin</button>
			</div>
		</div>
	</div>
	@if ($target->phone_number <> null)
	<div class="form-group col-lg-12">
		<label>No. Pengirim (Pulsa)</label>
		<div class="input-group">
			<input type="text" class="form-control" value="{!! $target->phone_number !!}" id="data-phone-{{ $target->id }}" readonly>
			<div class="input-group-append">
				<button class="btn btn-dark" type="button" onclick="copy('data-phone-{{ $target->id }}')"><i class="fa fa-copy fa-fw"></i> Salin</button>
			</div>
		</div>
	</div>
	@endif
	<div class="form-group col-6 col-lg-6">
		<label>Jumlah Transfer</label>
		<span class="form-control">Rp {{ number_format($target->amount,0,',','.') }}</span>
	</div>
	<div class="form-group col-6 col-lg-6">
		<label>Saldo Didapat</label>
		<span class="form-control">Rp {{ number_format($target->balance,0,',','.') }}</span>
	</div>
	@if ($target->deposit_method == true AND $target->deposit_method->note <> null AND $target->status == 'Pending')
	<div class="form-group col-lg-12">
		<label>Catatan</label>
		<span class="form-control" style="width: auto; height: auto; max-height: auto; overflow: auto;">{!! $target->additional_note <> '' ? nl2br($target->additional_note) : nl2br($target->deposit_method->note) !!}</span>
	</div>
	@endif
	<div class="form-group col-6 col-lg-6">
		<label>Status</label>
		<span class="form-control">{!! status($target->status) !!}</span>
	</div>
	@if ($target->ip_address <> null)
	<div class="form-group col-6 col-lg-6">
		<label>Alamat IP</label>
		<span class="form-control">{{ $target->ip_address }}</span>
	</div>
	@endif
	@if ($target->location <> null)
	<div class="form-group col-lg-12">
		<label>Informasi Perangkat</label>
		<span class="form-control" style="width: auto; height: auto; max-height: auto; overflow: auto;">{!! $target->location !!}</span>
	</div>
	@endif
</div>
<script src="{{ url('assets/js/snap.js') }}" data-client-key="{{ website_config('midtrans_payment')->client_key }}"></script>
<script>
    function snap_pay(token) {
		$("#modal").modal('hide');
        snap.pay(token, {
            onSuccess: function(result){
            },
            onPending: function(result){
            },
            onError: function(result){
            }
        });
    }
</script>