<x-guest-layout>
    <x-jetstream.authentication-card>
        <x-slot name="logo">
            <x-jetstream.application-mark class="hidden md:block md:h-20 xl:h-28 w-auto md:mt-3" />
        </x-slot>

        <x-jetstream.validation-errors class="mb-4" />

        <form method="POST" action="{{ route('non-user.password.update', ['profileType' => $profileType]) }}">
            @csrf

            <input type="hidden" name="token" value="{{ $token }}">
            <input type="hidden" name="profileType" value="{{ $profileType }}">


            <div class="block">
                <x-jetstream.label for="email" value="{{ __('Email') }}" />
                <x-jetstream.input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email', $email)" required autofocus />
            </div>

            <div class="mt-4" x-data="{ showPassword: false }">
                <x-jetstream.label for="password" value="{{ __('Password') }}" />
                <div class="relative">
                    <x-jetstream.input id="password" class="block mt-1 w-full pr-10" ::type="showPassword ? 'text' : 'password'" name="password" required autocomplete="new-password" />
                    <div class="absolute inset-y-0 right-0 pr-3 flex items-center text-sm leading-5">
                        <button type="button" @click="showPassword = !showPassword" class="text-theme-muted hover:text-theme-primary focus:outline-none focus:text-theme-primary ring-opacity-70 hover:opacity-90">
                            <template x-if="showPassword">
                                <x-icon name="eye" class="h-5 w-5" />
                            </template>
                            <template x-if="!showPassword">
                                <x-icon name="eye-slash" class="h-5 w-5 opacity-70" />
                            </template>
                        </button>
                    </div>
                </div>
            </div>

            <div class="mt-4" x-data="{ showPassword: false }">
                <x-jetstream.label for="password_confirmation" value="{{ __('Confirm Password') }}" />
                <div class="relative">
                    <x-jetstream.input id="password_confirmation" class="block mt-1 w-full pr-10" ::type="showPassword ? 'text' : 'password'" name="password_confirmation" required autocomplete="new-password" />
                    <div class="absolute inset-y-0 right-0 pr-3 flex items-center text-sm leading-5">
                        <button type="button" @click="showPassword = !showPassword" class="text-theme-muted hover:text-theme-primary focus:outline-none focus:text-theme-primary ring-opacity-70 hover:opacity-90">
                            <template x-if="showPassword">
                                <x-icon name="eye" class="h-5 w-5" />
                            </template>
                            <template x-if="!showPassword">
                                <x-icon name="eye-slash" class="h-5 w-5 opacity-70" />
                            </template>
                        </button>
                    </div>
                </div>
            </div>


            <div class="flex items-center justify-end mt-4">
                <x-jetstream.button>
                    {{ __('Reset password') }}
                </x-jetstream.button>
            </div>
        </form>
    </x-jetstream.authentication-card>
</x-guest-layout>