import React, { useState } from 'react';
import {Text, View, StyleSheet} from 'react-native';
import DetailCompensateView from './view';

const DetailCompensate = (props) => {
   const [item, setItem] = useState({
      rest: 5,
      compensate: 0,
      total: 25,
    });
    
    const [itemDetail, setItemDetail] = useState({
      rest: 5,
      compensate: 0,
      total: 25,
    });
    
    const [listData, setDataList] = useState([
      {
        id:1,
        date:'2024-01-01',
        status:'Đã xác nhận',
        dayOfWeek:'Thứ 2',
        periods:[
          {
           id:1,
           time:'6',
          },
          {
            id:2,
            time:'7',
          },
          {
            id:3,
            time:'8',
          },
          {
            id:4,
            time:'9',
          }
        ],
        dateStudy:'30/07/2025',
        location:'Phòng B2.12',
        teacher:'Nguyễn Minh Đức',
        note:'',
      },
      {
        id:2,
        date:'2024-01-01',
        status:'Chờ phê duyệt',
        dayOfWeek:'Thứ 2',
        periods:[
          {
           id:1,
           time:'6',
          },
          {
            id:2,
            time:'7',
          },
          {
            id:3,
            time:'8',
          },
          {
            id:4,
            time:'9',
          }
        ],
        dateStudy:'30/07/2025',
        location:'Phòng B2.12',
        teacher:'',
        note:'',
      },
      {
        id:3,
        date:'2024-01-01',
        status:'Từ chối',
        dayOfWeek:'Thứ 2',
        periods:[
          {
           id:1,
           time:'6',
          },
          {
            id:2,
            time:'7',
          },
          {
            id:3,
            time:'8',
          },
          {
            id:4,
            time:'9',
          }
        ],
        dateStudy:'30/07/2025',
        location:'Phòng B2.12',
        teacher:'',
        note:'',
      },
      {
        id:4,
        date:'2024-01-01',
        status:'Đã xác nhận',
        dayOfWeek:'Thứ 2',
        periods:[
          {
           id:1,
           time:'6',
          },
          {
            id:2,
            time:'7',
          },
          {
            id:3,
            time:'8',
          },
          {
            id:4,
            time:'9',
          }
        ],
        dateStudy:'30/07/2025',
        location:'Phòng B2.12',
        teacher:'',
        note:'',
      },
      {
        id:5,
        date:'2024-01-01',
        status:'Đã xác nhận',
        dayOfWeek:'Thứ 2',
        periods:[
          {
           id:1,
           time:'6',
          },
          {
            id:2,
            time:'7',
          },
          {
            id:3,
            time:'8',
          },
          {
            id:4,
            time:'9',
          }
        ],
        dateStudy:'30/07/2025',
        location:'Phòng B2.12',
        teacher:'',
        note:'',
      },
    ])
  return (
    <DetailCompensateView item={item} listData={listData} itemDetail={itemDetail}/>
  );
};

export default DetailCompensate;
