import 'dart:developer';

import 'package:traderscircuit/Utils/api_urls.dart';
import 'package:traderscircuit/Utils/base_manager.dart';
import 'package:traderscircuit/data/network/network_api_services.dart';
import 'package:traderscircuit/model/ContentBytesModel/more_video_model.dart';

VideoMoreModel? MoreVideoObj;

class MoreVideoAPI {
  Future<ResponseData<dynamic>> getMoreVideo(dynamic data) async {
    final response = await NetworkApiServices().postApi(
      data,
      ApiUrls.morevideoApi,
    );
    log(response.data.toString());
    if (response.status == ResponseStatus.SUCCESS) {
      Map<String, dynamic> responseData =
          Map<String, dynamic>.from(response.data);
      if (responseData['status'] == "success") {
        MoreVideoObj = VideoMoreModel.fromJson(responseData);
        return response;
      } else {
        return ResponseData<dynamic>(
            responseData['message'], ResponseStatus.FAILED);
      }
    }
    return response;
  }
}
