import 'package:boilerplate/core/styles/my_dimensions.dart';
import 'package:boilerplate/presentation/widgets/base_scaffold.dart';
import 'package:boilerplate/presentation/widgets/ipm_title_text.dart';
import 'package:flutter/material.dart';

import '../../../../core/i18n/translations.g.dart';
import '../../../../core/styles/my_font.dart';
import '../../../../core/utils/navigator_util.dart';
import '../detail/product_detail_screen.dart';
import 'widgets/interest_product_info_meeting.dart';
import 'widgets/meeting_info.dart';
import 'widgets/saller_info_meeting.dart';

class ConfirmBusinessMeetingScreen extends StatefulWidget {
  ConfirmBusinessMeetingScreen({Key? key}) : super(key: key);

  @override
  State<ConfirmBusinessMeetingScreen> createState() =>
      _ConfirmBusinessMeetingScreenState();
}

class _ConfirmBusinessMeetingScreenState
    extends State<ConfirmBusinessMeetingScreen> {
  @override
  Widget build(BuildContext context) {
    return BaseScaffold(
      title: AppLocalizations.products.business_meeting,
      body: Column(
        children: [
          Expanded(
            child: SingleChildScrollView(
              padding: EdgeInsets.all(MyDimens.dimen16),
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  IPMTitleText(
                    title1: AppLocalizations.products.confirm_meeting_title1,
                    title2: AppLocalizations.products.confirm_meeting_title2,
                  ),
                  SizedBox(height: MyDimens.dimen14),
                  SallerInfoMeeting(),
                  SizedBox(height: MyDimens.dimen20),
                  MeetingInfo(),
                  SizedBox(height: MyDimens.dimen20),
                  InterestProductInfoMeeting(),
                ],
              ),
            ),
          ),
          GestureDetector(
            onTap: () {
              NavigatorUtil.popUntil(ProductDetailScreen.tag);
            },
            child: Container(
              padding: EdgeInsets.only(
                top: MyDimens.dimen24,
                bottom:
                    MediaQuery.of(context).padding.bottom + MyDimens.dimen24,
              ),
              alignment: Alignment.center,
              decoration: BoxDecoration(
                gradient: LinearGradient(
                  colors: [Color(0xFFF15B44), Color(0xFFB21F29)],
                  begin: Alignment.topCenter,
                  end: Alignment.bottomCenter,
                ),
                borderRadius: BorderRadius.only(
                  topLeft: Radius.circular(10),
                ),
              ),
              child: Text(
                AppLocalizations.products.create_meeting,
                style: MyFont.medium20.copyWith(
                  color: Colors.white,
                ),
              ),
            ),
          )
        ],
      ),
    );
  }
}
