import 'package:get/get.dart';
import 'package:tone_snap/generated/assets.dart';
import 'package:tone_snap/routes/app_routes.dart';

class SettingsController extends GetxController {
  final options = ['About', 'Privacy Policy', 'User Agreement'];
  final optionIcons = [Assets.sideAAbout, Assets.sideAPrivacy, Assets.sideAUserAgreement];

  void onTapItem(int index) async {
    if (index == 0) {
      Get.toNamed(AppRoutes.about);
    } else if (index == 1) {
      Get.toNamed(AppRoutes.privacy, arguments: {
        'title': options[index],
        'url': 'https://tonesnap-privacy.mystrikingly.com',
      });
    } else if (index == 2) {
      Get.toNamed(AppRoutes.terms, arguments: {
        'title': options[index],
        'url': 'https://tonesnap-terms.mystrikingly.com'
      });
    }
  }
}
