package com.team.app.activities;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.FrameLayout;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.team.app.Constant;
import com.team.app.Functions;
import com.team.app.R;
import com.team.app.adapter.FAQAdapter;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;
import com.google.android.gms.ads.MobileAds;
import com.google.android.gms.ads.initialization.AdapterStatus;

import java.util.Map;

public class FAQActivity extends AppCompatActivity {

    RecyclerView recyclerView;
    AdView adView;
    String[] title = {"What does this app Do and How to Use It?",
            "Is this the Official Fantasy Sports Game App?",
            "Why should I trust this app?",
            "Should I copy Predicted Teams while joining a League?",
            "Is this app only for IPL?",
            "Why I did not got my cash bonus after referring a friend?",
            "Why Fantasy Sports Game Is not Illegal in India?",
            "Is Fantasy Sports Game Playing a Fair Game?",
            "Why Fantasy Sports Game is Ban In Assam and Orissa and How to play from there?",
            "Is It Safe to give your Bank Statement To Fantasy Sports Game?"
    };
    String[] desc = {"Hey Thanks For Downloading Our App We are a team of College students behind this app We have been playing Fantasy Sports Game Since it was launched firstAnd over the years we have gathered some really useful tips and tricks So we have decided to share this knowledge using a stable medium. Hence we have decided to make this app In this app we provide you with Pro Tips and Trick, which you can use to increase your chances of winning Leagues in Fantasy Sports Game Along with Pro Tips we also work on providing Daily Predictions of teams For IPL matches (International and English County coming soon) We provide all the information related to match in short and easy language at one place, to make your work easy You can use those information to make your My Dream Team or you can Copy our Predicted team and make some changes as you like",
            "No This app gives you the Daily Team Prediction and Pro Tips to pick your My Dream Team We are not Affiliated to Fantasy Sports Game If you face any technical issue regarding Fantasy Sports Game Please Contact their Official Support Team (link) You can download the Official Fantasy Sports Game App fromm their official website (link) Please dont give negative review saying this is not the official app It has clearly mentioned it is just a Tips and Prediction app, still more than half 1star reviews are given by people saying Its not the official app We have worked really hard to provide you with this service, please dont give false reviews :)",
            "We are a team of college students in final year We have spent all our College time playing Fantasy Sports Game, since the site was launced Our friends used to copy our teams and we used to share our team on social media Over the years of experience of playing this game, we began to collect some useful tips and trick that would help anyone, if applied properly And then we kept getting message on oue facebook page from people asking tips and how we select our teams Then we realised that we should share our knowledge to as many people as we can There are many people who are joining Fantasy Sports Game for the first time and they are literally clueless on how to play this game and how to select a proper team Also there are some people who have been playing for a long time but couldnt win due to lack of guidance So we have decided to help everyone whether they are playing it for first time or an experienced player",
            "We have got this question a lot People have been asking us, questions like Will This Prediction Guarantee Me Win The League? So we would like to clear some air first. While selecting your My Dream Team please use YOUR own Instincts and use our Predicted Teams as Reference You can make any changes to our predicted teams before joining a League We make a Predictions based on last 5 matches performance. We cannot Exactly Predict which player will play We do a lot of research before predicting a Team. But sometimes a Team does not perform as expected So we always request our user to make any changes as they like Also this app has more than 100,000 users. So if everyone will use the same team in Leagues, then everyones chances of winning will decrease by a great extent So Please make some changes in our teams by using your own instincts and information provided in our App In our Daily Prediction tab, we Daily Update Important Information related to the match This information is short and to the point. And include all the important facts related to players and match Using this information you can make your own Team first&lt;/u&gt;. Then Compare that team with our Predictions and make some changes in your team&lt;/u&gt; This is the best way to make a Team to join a cash League Never Rely on anyones prediction. Its your money. Please use your own instincts while selecting a Team",
            "The tips given in this app is applied to all fantasy cricket. However we ar right now only providing predictions for IPL matches As I have already told that, we are college students and right now we are busy in college work Soon we will add the prdiction for various other matches We will include predictions for other International matches and English county cricket soon in our app",
            "This is the most common question people have been asking us You get 100rs cash bonus after you refer a friend But Fantasy Sports Game has made the referral system quite difficult First you have to make sure you follow all the steps precisely for referring a friend. We have provided all the steps in details in our Pro Tips section Now after you refer your friend, You have to wait for getting your cash bonus You will get the 20 percent of cash bonus for every league your friend joins That means, if your friend joins a 20rs league, you will get a 4rs cash bonus, irrespective of if your friend win or losethe game So every time your friend joins a league you will get the 20 percent of the winning amount. Till you reach the 100rs cash bonus limit",
            "If you need some Luck to win a Game thats called Game Of Luck Which is Illegal in India Like Betting, Matka, Teen Patti etc But If you need some Skill to win a Game thats called Game Of Skill which is totaly legal in India\10 So Fantasy Sports Game and all the Fantasy Sports comes under Game Of Skill Here not everything depends on Luck. To make a good Fantasy team you need some Research skill, good knowledge of game, better understanding of game and pitch All these factors affect your selection of a team. So this is not purely Game of Luck. Your skills, experienced, understanding of game plays an important role in selecting a team Can you blindly Select a Football Team if you havent watched a single match of football? No But you can win Teen Patti even if you havent played that game in your life, thats the difference between Game of luck and Game of skill",
            "We get these types of questions a lot\10 What if they add their own team at final moment? \10 What if It is all fixed and they have their own team Well let me tell you this, Fantasy Sports Game is from top 100 startups in India, so it has a lot of reputations and very high money of investors at stakes There are more than 1 Crore Players who play Fantasy Sports Game and join cash Leagues Handling such a huge mount of traffic is a lot of work and requires hell lot of investment They would never risk their reputation and Investors money just for the sake of few lakh rupees Also 1 hour before the match starts, you can download the pdf file for all teams for all players who have joined the leagues There you can cross check if the first prize winner actually won the league or not",
            "If you join a cash League you might notice that there is a small note at bottom where it says that If you are from Assam you cannot participate So you might be wondering what these states did to get banned from Fantasy Sports Game? As wehave discussed earlier how Fantasy Sports Game is considered Game Of Skill and is legal In India However in these two states the topic is still in debate, that whether people should be allowed to invest money in Game Of Skill and whether Fantasy sport is a Game of Skill or not Thats why the government has decided not to allow their residence to invest money in Fantasy Sport unless the dispute is solved However You can still join the Free Leagues to practice you skill. But if you want to play cash Leagues and you are from Assam or Orrisa, then there is one thing you can do While making your dream11 account provide the bank details and Bank Account number of someone who does not live in Assam or Orrisa Like your friend or some relative who lives outside of orrisa and then tell them to transfer your winnings to your account This way you can play Fantasy Sports Game from orrisa on the name of your friend or relative who lives outside of Orrisa",
            "Yes It Is Totally Safe to give your Pan Card and Bank Account Number to Fantasy Sports Game We get this question a lot from our users Let me assure you, no one can do anything just by knowing you Pan Card Number or Your Bank Account Statement, unless they have some personal agenda against you And in Fantasy Sports Game, there are 1 Crore Players, so right now they have 1 Crore Pan Card Number and Bank Statement in their Data Base So your personal information is of no vlaue to them. They have a lot of other work to handle other than stalking someone Why they ask for Pan and Bank details? Well it is compulsory for them to verify, that its you who is withdrawing your money, not someone else They ask these details for your own safety",
            "When you observe their website you will see that there is no ads on that site Also they pay a hefty amount to Cricbuzz and Facebook to host their Ads So you might be wondering where they are getting their revenue from? Some of you might think they cover it from winning their own leagues Well you are wrong. The only Business model of Fantasy Sports Game is taking commission from Leagues Ever wondered when you join a 35rs League with two Players, why the winning amount is only 60rs, why not whole 70rs Well the rest 10rs is taken by Fantasy Sports Game as commission for Hosting this League for you. Which is quite fair Now imagine, there are 1 Crore People playing Fantasy Sports Game. And these people joins League where Fantasy Sports Game get commission Daily. Thats a lot of money So this also proves that there is no chance that Fantasy Sports Game will risk their Business model for just few Lakh rupees",
    };

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_faq);
        MobileAds.initialize(this, initializationStatus -> {
            Map<String, AdapterStatus> statusMap = initializationStatus.getAdapterStatusMap();
            for (String adapterClass : statusMap.keySet()) {
                AdapterStatus status = statusMap.get(adapterClass);
            }
            FrameLayout adContainerView0 = findViewById(R.id.bannerAdView);
            if(Constant.adShown && !Constant.BANNER_ADS_ID.equals("")) {
                adView = new com.google.android.gms.ads.AdView(this);
                adView.setAdUnitId(Constant.BANNER_ADS_ID);
                adContainerView0.addView(adView);
                adView.setAdSize(Functions.getAdSize(this));
                adView.loadAd(new AdRequest.Builder().build());
                adContainerView0.setVisibility(View.VISIBLE);
            }
        });
        findViewById(R.id.back).setOnClickListener(view -> FAQActivity.this.onBackPressed());
        findViewById(R.id.gifImage).setOnClickListener(view -> startActivity(new Intent(Intent.ACTION_VIEW,
                Uri.parse(getResources().getString(R.string.fantasy_power_11_link)))));
        recyclerView = findViewById(R.id.recyclerView);
        recyclerView.setLayoutManager(new LinearLayoutManager(this));
        recyclerView.setAdapter(new FAQAdapter(this,title,desc));
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        adView.destroy();
    }
}
