<?php $__env->startSection('title', 'Aceitar convite'); ?>

<?php $__env->startSection('content'); ?>
    <div class="flex flex-1 items-center justify-center p-6">
    <div class="mx-auto w-full max-w-md rounded-xl border border-slate-700 bg-slate-900 p-6 shadow-sm">
        <h1 class="text-xl font-semibold text-white">Convite para organização</h1>

        <?php if(session('error')): ?>
            <div class="mt-4 rounded-lg border border-red-400/40 bg-red-950/40 px-4 py-3 text-sm text-red-100">
                <?php echo e(session('error')); ?>

            </div>
        <?php endif; ?>

        <?php if(! $valid): ?>
            <p class="mt-4 text-sm text-slate-300">Este convite é inválido ou expirou.</p>
        <?php else: ?>
            <p class="mt-2 text-sm text-slate-300">
                Você foi convidado para <strong class="text-white"><?php echo e($invitation->tenant?->name); ?></strong>
                como <strong class="text-white"><?php echo e($invitation->role?->value); ?></strong>.
            </p>
            <form method="POST" action="<?php echo e(route('organizations.invitations.accept', $token)); ?>" class="mt-6 space-y-4">
                <?php echo csrf_field(); ?>
                <div>
                    <label class="text-xs font-medium uppercase tracking-wide text-slate-400">Seu nome</label>
                    <input type="text" name="name" value="<?php echo e(old('name')); ?>" required class="mt-1 w-full rounded-lg border border-slate-600 bg-slate-950 px-3 py-2 text-sm text-white" />
                </div>
                <div>
                    <label class="text-xs font-medium uppercase tracking-wide text-slate-400">E-mail</label>
                    <input type="email" value="<?php echo e($invitation->email); ?>" disabled class="mt-1 w-full rounded-lg border border-slate-700 bg-slate-950/50 px-3 py-2 text-sm text-slate-400" />
                </div>
                <div>
                    <label class="text-xs font-medium uppercase tracking-wide text-slate-400">Senha</label>
                    <input type="password" name="password" required minlength="8" class="mt-1 w-full rounded-lg border border-slate-600 bg-slate-950 px-3 py-2 text-sm text-white" />
                </div>
                <div>
                    <label class="text-xs font-medium uppercase tracking-wide text-slate-400">Confirmar senha</label>
                    <input type="password" name="password_confirmation" required minlength="8" class="mt-1 w-full rounded-lg border border-slate-600 bg-slate-950 px-3 py-2 text-sm text-white" />
                </div>
                <button type="submit" class="w-full rounded-lg bg-emerald-600 px-4 py-2 text-sm font-semibold text-white hover:bg-emerald-500">
                    Entrar na organização
                </button>
            </form>
        <?php endif; ?>
    </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.guest', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/backend/resources/views/organizations/accept-invitation.blade.php ENDPATH**/ ?>