@php
    $num = isset($countNum) ? $countNum + 1 : 0;
    $selected = isset($selectVal) ? $selectVal : 0;
    $skip = $skip ?? [];
@endphp

@foreach ($setAccounts as $account)
    @if (in_array($account->id, $skip))
    @else
        @if ($account->subAccount->isNotEmpty())
            <x-banck :setAccounts="$account->subAccount" :skip="$skip" :selectVal="$selected" :countNum="$num" />
        @else
            <option {{ $selected == $account->id ? 'selected' : '' }} value="{{ $account->id }}">
                {{ $account->account_name }} @if(!empty($account->account_code))- @endif{{ $account->account_code }} @if(!empty($account->bank_name))- @endif{{ $account->bank_name }} @if(!empty($account->customerCode))- @endif{{ $account->customerCode }}
            </option>
        @endif
    @endif
@endforeach
