import 'package:car_provider_app/config/routes.dart';
import 'package:car_provider_app/extensions/string_extensions.dart';
import 'package:car_provider_app/generated/locale_keys.g.dart';
import 'package:car_provider_app/models/m_response.dart';
import 'package:car_provider_app/utils/navigator.dart';
import 'package:car_provider_app/widgets/app_bar.dart';
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

import '../../api/client/branch_api_client.dart';
import '../../classes/colors.dart';
import '../../models/profile/branch2.dart';

class DealershipPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: appBar(context, title: LocaleKeys.dealershipSettings.tr()),
      body: Container(
        width: double.infinity,
        height: double.infinity,
        child: Column(
          children: [
            ListTile(
              leading: SvgPicture.asset(
                "assets/icons/ic_settings.svg",
                color: MyColors.darkPrimaryColor,
              ),
              title: LocaleKeys.general.tr().toText12(),
            ),
            ListTile(
              leading: SvgPicture.asset(
                "assets/icons/ic_branchs.svg",
                color: MyColors.darkPrimaryColor,
              ),
              title: LocaleKeys.defineBranches.tr().toText12(),
              onTap: () {
                navigateWithName(context, AppRoutes.branchList);
              },
            ),
            ListTile(
              leading: SvgPicture.asset(
                "assets/icons/ic_services.svg",
                color: MyColors.darkPrimaryColor,
              ),
              title: LocaleKeys.defineServices.tr().toText12(),
              onTap: () {
                navigateWithName(context, AppRoutes.createServices);
              },
            ),
            ListTile(
              leading: SvgPicture.asset(
                "assets/icons/ic_provider.svg",
                color: MyColors.darkPrimaryColor,
              ),
              title: LocaleKeys.defineProviders.tr().toText12(),
              onTap: () async {
                //  Branch2 mResponse = await BranchApiClent().getBranchAndServices();
              },
            ),
            ListTile(
              leading: SvgPicture.asset(
                "assets/icons/ic_close_account.svg",
                color: MyColors.darkPrimaryColor,
              ),
              title: LocaleKeys.closeAccount.tr().toText12(),
            ),
          ],
        ),
      ),
    );
  }
}
