import {Order} from "../../components/UI/DuaList/ListHeader/ListHead";
import { GetRequestParams } from "../Axios";

export interface ImpementationEntity
{
  created_at: string | null,
  description: string,
  id: number,
  name: string,
  updated_at: string,
  view_name_el: string,
  view_name_en: string,
}

export interface Call
{
  allows_individuals: boolean,
  code: string,
  created_at: string,
  description: string,
  domain_ui_name: string,
  end_date: string | null,
  hash_id: string,
  id: number,
  is_active: boolean,
  proposals_exists?: boolean,
  proposals_count?: string | number,
  phase_id: number,
  start_date: string,
  submission_program_id: number,
  title: string,
  type_id: number,
  updated_at: string | null
}
export interface Program
{
  acronym: string,
  auth_type_id: number,
  calls: Call[],
  calls_count: number,
  created_at: string,
  description: string,
  duration: string,
  end_date: string | null,
  has_deadline: boolean,
  hash_id: string,
  id: number,
  is_active: boolean,
  logo_path: string | null,
  name: string,
  implementation_entity: ImpementationEntity,
  implementation_entity_id: number,
  start_date: string,
  submission_program_type_id: number,
  ui_info: {
  active_call_id: number | null,
  has_active_call: boolean,
  type: string,
  value: string
  },
  updated_at: string | null,
  view_name_el: string,
  view_name_en: string,
  website_url: string | null
}

export interface GetSubmissionProgramsParams extends GetRequestParams {
    active_role: any,
    implementation_entity: any,
}

interface Metadata {
  page_count: number;
  page: string;
  page_size: string;
  total_count: number;
}

interface SubmissionProgramsData {
  counters: any,
  metadata: Metadata;
  records: Program[];
}

export interface GetSubmissionProgramsList {
  lookups: any;
  programs: SubmissionProgramsData;
}