import 'package:absensi_sas/model/approval_type_model.dart';

import 'package:hooks_riverpod/hooks_riverpod.dart';

class ApprovalFilterProvider {
  DateTime startDate = DateTime.now();
  DateTime endDate = DateTime.now();
  String keyword = "";
  List<String> selectedApprovalType = [];
  final approvalTypeList = [
    ApprovalTypeModel(id: "1", name: "Presensi", isActive: false, value: "p"),
    ApprovalTypeModel(id: "2", name: "Cuti", isActive: true, value: "c"),
    ApprovalTypeModel(id: "3", name: "Lembur", isActive: false, value: "l"),
  ];
  ApprovalFilterProvider(
      {required this.endDate,
      required this.keyword,
      required this.selectedApprovalType,
      required this.startDate});
}

final approvalFilterProvider = StateProvider<ApprovalFilterProvider>((ref) {
  return ApprovalFilterProvider(
      selectedApprovalType: [],
      endDate: DateTime.now(),
      keyword: "",
      startDate: DateTime.now());
});
