
import { FC } from 'react';

export interface IRepositories {
  getSystems: (params?: any) => Promise<any>;
  getResources: (params?: any) => Promise<any>;
  getPlans: (params?: any) => Promise<any>;
  getLocations: (params?: any) => Promise<any>;
  getApprovalGroups: (params?: any) => Promise<any>;
  resolveSystems: (ids: string[]) => Promise<Map<string, any>>;
  resolveResources: (ids: string[]) => Promise<Map<string, any>>;
  resolvePlans: (ids: string[]) => Promise<Map<string, any>>;
  resolveLocations: (ids: string[]) => Promise<Map<string, string>>;
}

export interface EntitlementObject {
  objectType: string;
  name: string;
  tags: string[];
  configuration: Record<string, unknown>;
  schedules: any[];
}

export interface EntitlementEditorProps {
  initialData: EntitlementObject;
  repositories?: IRepositories;
  onSave?: (data: EntitlementObject) => void;
  onSaveAndReturn?: (data: EntitlementObject) => void;
  onBack?: () => void;
  additionalCanvasMenuItems?: any[];
  additionalNodeMenuItems?: (node: any) => any[];
}

declare const EntitlementEditor: FC<EntitlementEditorProps>;
export default EntitlementEditor;
export { EntitlementEditor };

export interface RepositoryProviderProps {
  children: React.ReactNode;
  repositories: IRepositories;
}

export declare const RepositoryProvider: FC<RepositoryProviderProps>;
export declare const useRepositories: () => IRepositories;
