import {scopedEndpoint} from '@/shared/services/httpClient';
import type {Endpoint, Scope} from '@/shared/services/httpClient';
import type {Store} from '@/features/stores/types/store';

/** Store endpoints. See dashboardRepository for the layer's contract. */
export const storeRepository = {
  list: (scope: Scope): Endpoint<Store[]> => scopedEndpoint('/api/stores', scope),

  byId: (scope: Scope, storeId: string): Endpoint<Store> =>
    scopedEndpoint(`/api/stores/${storeId}`, scope),
};
