import 'package:cims_apps/application/assets/path_assets.dart';
import 'package:cims_apps/application/component/image/image_view.dart';
import 'package:cims_apps/application/theme/color_palette.dart';
import 'package:flutter/material.dart';

class TypeApp {
  String img, title;

  TypeApp(this.img, this.title);
}

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

  @override
  Widget build(BuildContext context) {
    Map<String, TypeApp> typeApp = {
      'Shopping Pay': TypeApp(PathAssets.imgOpenShopping, 'Shopping App'),
    };

    return Column(
      children: [
        ImageView(image: typeApp[value]!.img),
        Text('Open ${typeApp[value]!.title}',
          style: TextStyle(
            fontSize: 22,
            fontWeight: FontWeight.w600,
            color: ColorPalette.slate800
          ),
        ),
        Text('You will be redirected to the ${typeApp[value]!.title.toLowerCase()} to continue the payment',
          style: TextStyle(
              fontSize: 16,
              color: ColorPalette.slate400
          ),
        )
      ],
    );
  }
}
