import { IRepository } from './repository.interface';
import { RestaurantGroup, RestaurantBrand, RestaurantOutlet, RestaurantHierarchy } from '../../models/restaurant.model';

/**
 * Restaurant Group Repository Interface
 */
export interface IRestaurantGroupRepository extends IRepository<RestaurantGroup> {
  /**
   * Get full restaurant hierarchy for a group
   * @param groupId Group ID
   * @returns Promise resolving to full restaurant hierarchy
   */
  getFullHierarchy(groupId: string): Promise<RestaurantHierarchy | null>;
}

/**
 * Restaurant Brand Repository Interface
 */
export interface IRestaurantBrandRepository extends IRepository<RestaurantBrand> {
  /**
   * Find brands by group ID
   * @param groupId Group ID
   * @returns Promise resolving to array of brands
   */
  findByGroupId(groupId: string): Promise<RestaurantBrand[]>;
}

/**
 * Restaurant Outlet Repository Interface
 */
export interface IRestaurantOutletRepository extends IRepository<RestaurantOutlet> {
  /**
   * Find outlets by brand ID
   * @param brandId Brand ID
   * @returns Promise resolving to array of outlets
   */
  findByBrandId(brandId: string): Promise<RestaurantOutlet[]>;

  /**
   * Find outlets by POS ID
   * @param posId POS system ID
   * @returns Promise resolving to outlet or null if not found
   */
  findByPosId(posId: string): Promise<RestaurantOutlet | null>;
}
