import { OptionType } from '@/components/input/SelectInput';
import * as Yup from 'yup';

export const RecordingFilterSchema = Yup.object().shape({
  area_id: Yup.object({
    value: Yup.number().nullable(),
    label: Yup.string().nullable(),
  }).nullable(),
  location_id: Yup.object({
    value: Yup.number().nullable(),
    label: Yup.string().nullable(),
  }).nullable(),
  project_flock_id: Yup.object({
    value: Yup.number().nullable(),
    label: Yup.string().nullable(),
  }).nullable(),
  kandang_id: Yup.object({
    value: Yup.number().nullable(),
    label: Yup.string().nullable(),
  }).nullable(),
  project_flock_kandang_id: Yup.number().nullable(),
  approval_status: Yup.object({
    value: Yup.string().nullable(),
    label: Yup.string().nullable(),
  }).nullable(),
  project_flock_category: Yup.object({
    value: Yup.string().nullable(),
    label: Yup.string().nullable(),
  }).nullable(),
});

export type RecordingFilterType = {
  area_id: OptionType<number> | null;
  location_id: OptionType<number> | null;
  project_flock_id: OptionType<number> | null;
  kandang_id: OptionType<number> | null;
  project_flock_kandang_id: number | null;
  approval_status: OptionType<string> | null;
  project_flock_category: OptionType<string> | null;
};
