import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';

import '../../../components/button/button.dart';
import '../../../components/field/field.dart';
import '../../../router/app_router.gr.dart';

@RoutePage()
class CreatePasswordPage extends StatelessWidget {
  const CreatePasswordPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Buat Kata Sandi')),
      body: Padding(
        padding: const EdgeInsets.symmetric(horizontal: 24.0),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            const SizedBox(height: 40),

            // Title
            AppPasswordTextFormField(
              title: 'Masukkan kata sandi',
              hintText: '********',
            ),
            SizedBox(height: 24),
            AppPasswordTextFormField(
              title: 'Ulangi kata sandi',
              hintText: '********',
            ),

            const SizedBox(height: 50),

            Spacer(),

            // Continue Button
            AppElevatedButton(
              onPressed: () => context.router.push(const MainRoute()),
              title: 'Konfirmasi',
            ),

            const SizedBox(height: 24),
          ],
        ),
      ),
    );
  }
}
