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

import '../../../../core/styles/app_color.dart';
import '../../../../core/styles/app_text.dart';
import '../../../../core/utils/secure/secure_storage_service.dart';
import '../../../../shared/components/appbar_widget.dart';
import '../bloc/pin_bloc.dart';
import 'confirm_pin_layout.dart';

class ConfirmPinScreen extends StatelessWidget {
  const ConfirmPinScreen({super.key});

  @override
  Widget build(BuildContext context) {
    final secureStorageService = SecureStorageService();
    return Scaffold(
      backgroundColor: AppColor.plainWhite,
      appBar: const AppBarWidget(
        height: 75,
        titleTxt: AppText.createPinCode,
        showLeading: true,
      ),
      resizeToAvoidBottomInset: true,
      body: MultiBlocProvider(
        providers: [
          BlocProvider(
            // Create an instance of the OnboardingBloc
            create: (context) =>
                PinBloc(secureStorageService: secureStorageService),
          ),
        ],
        child: const ConfirmPinLayout(),
      ),
    );
  }
}
