import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:gap/gap.dart';
import 'package:tanami_app/core/styles/app_color.dart';
import 'package:tanami_app/core/styles/app_text.dart';
import 'package:tanami_app/shared/components/text_widget.dart';

import '../../../../core/styles/app_images.dart';

class PinTopSection extends StatelessWidget {
  final String fromScreen;
  const PinTopSection({
    super.key,
    required this.fromScreen,
  });

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        const Gap(70),
        Center(
          child: SvgPicture.asset(
            AppImages.welcomeLogo,
          ),
        ),
        const Gap(40),
        (fromScreen == "login" || fromScreen == "LoginedInUser")
            ? Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  Row(
                    mainAxisAlignment: MainAxisAlignment.center,
                    crossAxisAlignment: CrossAxisAlignment.center,
                    children: [
                      TextWidget().text14W500(AppText.welcomeBackText,
                          clr: AppColor.smokeGrayColor),
                      TextWidget()
                          .text14W700(", Jayesh", clr: AppColor.plainBlack),
                    ],
                  ),
                  TextWidget().text14W500(
                      AppText.userYourAppPinToLoginEnterTanami,
                      clr: AppColor.smokeGrayColor),
                  const Gap(25),
                  TextWidget().text14W400(
                    AppText.pinCode,
                    clr: AppColor.textLabelColor,
                  )
                ],
              )
            : fromScreen == "forgot-pin" || fromScreen == "reset-pin"
                ? TextWidget().text14W500(
                    AppText.changePinCode,
                    clr: AppColor.textLabelColor,
                  )
                : TextWidget().text14W500(
                    AppText.createPinCode,
                    clr: AppColor.textLabelColor,
                  )
      ],
    );
  }
}
