export type Camera = {
  name: string;
  rtsp_url: string;
};

export type Schedule = {
  enabled: boolean;
  weekdays_from: string;
  weekdays_to: string;
  weekend_all_day: boolean;
};

export type AppConfig = {
  mediamtx_api_url: string;
  mediamtx_webrtc_url: string;
  mediamtx_api_user?: string | null;
  mediamtx_api_pass?: string | null;
  recordings_dir: string;
  api_port?: number;
  cameras: Camera[];
  schedule: Schedule;
};

export type AppConfigUpdate = {
  mediamtx_api_url: string;
  mediamtx_webrtc_url: string;
  mediamtx_api_user?: string | null;
  mediamtx_api_pass?: string | null;
  recordings_dir: string;
  api_port: number;
};

export type RecordingItem = {
  camera: string;
  filename: string;
  timestamp: string;
  url: string;
};

export type MediaMtxPathsListItem = {
  name: string;
  ready?: boolean;
};

export type MediaMtxPathsListResponse = {
  items?: MediaMtxPathsListItem[];
  itemCount?: number;
  pageCount?: number;
};

export type MediaMtxConfigView = {
  api_url: string;
  webrtc_url: string;
  record_enabled: boolean;
  record_delete_after_days?: number | null;
  cameras: Camera[];
};
