import MoveList from '@/features/trackSomething/components/MoveList';
import MoveOrderList from '@/features/trackSomething/components/MoveOrderList';
import { rpxToPx } from '@/utils/tools';
import { Canvas, View, Text, PageContainer, ScrollView, Image } from '@tarojs/components';

import { MovableArea, MovableView } from "@tarojs/components";
import VirtualList from '@tarojs/components/virtual-list';
import React from 'react';
import { useEffect, useState } from 'react';
import './demo.scss'
import Taro from '@tarojs/taro';
import Slider from '@/components/input/Slider2';
import Timer from '@/components/basic/Timer';





export default function Demo() {
  const [selIndex, setSelIndex] = useState(0)
  
  // 定义一个二维数组
  const array: number[][] = [];

  // 初始化二维数组
  for (let i = 0; i < 12; i++) {
    array[i] = new Array(31).fill(0);
  }

  console.log(array)
  return (
    <View>
      <View>

        <View className={selIndex == 0 ? "single_check_sel" : "single_check_nor"} onClick={() => { setSelIndex(0); global.updateMixItem([true, false, false]); setCount((prevCounter) => prevCounter + 1) }}>
          <Text className={selIndex == 0 ? "single_check_text_sel" : "single_check_text_nor"}>睡前断食</Text>
          {
            selIndex == 0 && <Image src={require('@assets/images/check_black.png')} className="single_checked" />
          }
        </View>
        <View className={selIndex == 1 ? "single_check_sel" : "single_check_nor"} onClick={() => { setSelIndex(1); global.updateMixItem([false, true, false]); setCount((prevCounter) => prevCounter + 1) }}>
          <Text className={selIndex == 1 ? "single_check_text_sel" : "single_check_text_nor"}>睡眠中断食</Text>
          {
            selIndex == 1 && <Image src={require('@assets/images/check_black.png')} className="single_checked" />
          }
        </View>
        <View className={selIndex == 2 ? "single_check_sel" : "single_check_nor"} onClick={() => { setSelIndex(2); global.updateMixItem([false, false, true]); setCount((prevCounter) => prevCounter + 1) }}>
          <Text className={selIndex == 2 ? "single_check_text_sel" : "single_check_text_nor"}>起床后断食</Text>
          {
            selIndex == 2 && <Image src={require('@assets/images/check_black.png')} className="single_checked" />
          }
        </View>
      </View>
      {/* <Timer />

      <ScrollView scrollX scrollY enableFlex className='demoMain'>
        {
          array.map((list, i) => {
            return <View >
              {
                list.map((item, j) => {
                  return <Image className='demoItem' mode="aspectFill" src='https://fast-dev.oss-cn-beijing.aliyuncs.com/users/3e1751a7280581c5c183b0fd8261da15/food-journal/2024/307e27cf-c284-4054-b59d-fb75fe5bd6a6_20240109154737_945.webp?x-oss-process=image/resize,w_50,limit_0'/>
                  // return <View className='demoItem'></View>
                })
              }
            </View>
          })
        }
      </ScrollView> */}
    </View>
  )
}
