import { Category, CategoryFormValues } from "./api/entities/category";

/**
 * Interface representing a data source for handling category-related operations.
 */
export interface CategoryDatasourceInf {
  /**
   * Registers a new category.
   * @param form - The category data to register.
   * @returns A promise that resolves when the registration is complete.
   */
  registerCategory(form: CategoryFormValues): Promise<void>;

  /**
   * Retrieves a list of categories.
   * @returns A promise that resolves to an array of Category objects.
   */
  getCategories(): Promise<Category[]>;

  /**
   * Deletes an existing category.
   * @param category - The category to delete.
   * @returns A promise that resolves when the deletion is complete.
   */
  deleteCategory(category: Category): Promise<void>;
}
