content: import 'package:anymex/models/Media/media.dart';
  import 'package:anymex/utils/function.dart';
  import 'package:anymex/widgets/common/big_carousel.dart';
  import 'package:anymex/widgets/common/future_reusable_carousel.dart';
  import 'package:anymex/widgets/common/reusable_carousel.dart';
  import 'package:anymex/widgets/custom_widgets/custom_text.dart';
  import 'package:dartotsu_extension_bridge/dartotsu_extension_bridge.dart';
  import 'package:flutter/material.dart';
  import 'package:dartotsu_extension_bridge/Models/Source.dart';
  import 'package:get/get.dart';
  
  Widget buildSection(String title, List<dynamic> data,
      {DataVariant variant = DataVariant.regular,
      bool isLoading = false,
      ItemType type = ItemType.anime,
      Source? source}) {
    return ReusableCarousel(
      data: data,
      title: title,
      type: type,
      variant: variant,
      isLoading: isLoading,
      source: source,
    );
  }
  
  Widget buildLoader(String title) {
    return ReusableCarousel(
      data: const [],
      title: title,
      isLoading: true,
    );
  }
  
  Container buildChip(String label) {
    return Container(
      padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 2),
      margin: const EdgeInsets.symmetric(vertical: 2, horizontal: 10),
      decoration: BoxDecoration(
        color: Get.theme.colorScheme.primary,
        borderRadius: BorderRadius.circular(10),
      ),
      child: FittedBox(
        fit: BoxFit.scaleDown,
        child: AnymexText(
          text: label,
          variant: TextVariant.bold,
          color: Get.theme.colorScheme.onPrimary,
          size: 14,
        ),
      ),
    );
  }
  
  Widget buildBigCarousel(List<Media> data, bool isManga, {CarouselType? type}) {
    return BigCarousel(
        data: data,
        carouselType:
            type ?? (isManga ? CarouselType.manga : CarouselType.anime));
  }
  
  Widget buildMangaSection(String title, List<Media> data,
      {bool isAnilist = false}) {
    return ReusableCarousel(
      data: data,
      title: title,
      type: ItemType.manga,
      variant: isAnilist ? DataVariant.anilist : DataVariant.regular,
    );
  }
  
  Widget buildFutureSection(
    String title,
    Future<List<dynamic>> future, {
    DataVariant variant = DataVariant.regular,
    ItemType type = ItemType.anime,
    Source? source,
    Widget? errorWidget,
    Widget? emptyWidget,
  }) {
    return FutureReusableCarousel(
      future: future,
      title: title,
      variant: variant,
      type: type,
      source: source,
      errorWidget: errorWidget,
      emptyWidget: emptyWidget,
    );
  }
  