/**
 * Copyright IBM Corp. 2024, 2025
 */

import { apiConnectionInfo } from "../../apim/apim-connection-info.interface.js";

/**
 * Interface representing a sample project
 */
export interface SampleProject {
  /**
   * Name of the sample project file
   */
  name: string;
  
  /**
   * Content of the sample project as a Blob
   */
  content: Blob;
}

/**
 * Result of creating a project from a sample
 */
export interface CreateSampleProjectResult {
  /**
   * Whether the operation was successful
   */
  success: boolean;
  
  /**
   * The name of the created project
   */
  projectName?: string;
  
  /**
   * Error message if the operation failed
   */
  error?: string;
}

/**
 * Interface for handling sample project operations
 */
export interface ISampleProjectHandler {
  
  /**
   * Get all sample projects with their content
   * @returns Promise with an array of sample projects containing name and content
   */
  getAllSampleProjects(): Promise<SampleProject[]|null>;
  
  /**
   * Extract files from a zip blob
   * @param zipBlob The zip file as a Blob
   * @param zipFileName The name of the zip file
   * @returns Promise with extracted files
   */
  extractFilesFromZip(zipBlob: Blob, zipFileName: string): Promise<{ files: File[] }>;
  
  /**
   * Load and create all available sample projects
   * @returns Promise with the results of creating each project
   */
  loadAllSampleProjects(isMFE:boolean): Promise<CreateSampleProjectResult[]>;
}

// Made with Bob
