import React from "react";
import Spring from "@components/Spring";
import AutoWinList from "@components/AutoWinList";
import {useThemeProvider} from "@contexts/themeContext";

const AutoBigWin=({data})=>{
    const {isMobile} = useThemeProvider();
    const cdata=Object.assign({tabs:[]},data);
    const formatData=()=>{
        if (cdata){
            if (cdata.title==null)cdata.title="win_list.big_wins";
            let tabs=cdata.tabs;
            if (tabs){
                let isexit=false;
                for (var i=0;i<tabs.length;i++){
                    let tab=tabs[i];
                    if (tab&&tab.type===0){
                        isexit=true;
                        break;
                    }
                }
                if (!isexit){
                    tabs=tabs.slice(0);
                    tabs.unshift({type:0,title:'win_list.tab_all'});
                    cdata.tabs=tabs;
                }
            }
        }
    }
    formatData();
    return (
        <div className={``}>
            <AutoWinList data={cdata}></AutoWinList>
        </div>
    )
}
export default AutoBigWin;
