@php
    $name = $name ?? 'password';
    $label = $label ?? 'Password';
    $required = $required ?? false;
    $labelClass = $labelClass ?? 'form-label';
    $autocomplete = $autocomplete ?? 'new-password';
@endphp
<div class="mb-3">
    <label class="{{ $labelClass }}"><strong>{{ $label }}</strong></label>
    <div class="input-group js-password-wrap">
        <input
            type="password"
            name="{{ $name }}"
            class="form-control @error($name) is-invalid @enderror"
            {{ $required ? 'required' : '' }}
            autocomplete="{{ $autocomplete }}"
        >
        <button type="button" class="btn btn-primary light js-toggle-password" tabindex="-1" aria-label="Show password">
            <i class="fa fa-eye"></i>
        </button>
    </div>
    @error($name)
        <div class="invalid-feedback d-block">{{ $message }}</div>
    @enderror
</div>
