import 'package:flutter/material.dart';
import 'package:test_sa/extensions/int_extensions.dart';
import 'package:test_sa/extensions/text_extensions.dart';
import 'package:test_sa/extensions/widget_extensions.dart';
import 'package:test_sa/new_views/app_style/app_color.dart';

import '../common_widgets/default_app_bar.dart';

class HelpCenterPage extends StatelessWidget {
  static const id = "/help_center_page";

  const HelpCenterPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: const DefaultAppBar(title: "Help Center"),
      body: Card(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: [
            buildElement(context, title: "FAQs").onPress(() {}),
            8.height,
            const Divider().defaultStyle(context),
            8.height,
            buildElement(context, title: "Guidebook").onPress(() {}),
            8.height,
            const Divider().defaultStyle(context),
            8.height,
            buildElement(context, title: "Feedback").onPress(() {}),
            8.height,
            const Divider().defaultStyle(context),
            8.height,
            buildElement(context, title: "Contact Us").onPress(() {}),
          ],
        ).paddingAll(16),
      ).paddingAll(16),
    );
  }

  Widget buildElement(BuildContext context, {required String title}) {
    return Row(
      mainAxisAlignment: MainAxisAlignment.spaceBetween,
      children: [
        title.heading5(context).custom(color: AppColor.textStyleColor(context)),
        "arrow_right".toSvgAsset(width: 17),
      ],
    );
  }
}
