import { EntityType, IEventBus } from '../../types/CalendarTypes';
import { ViewConfig } from '../../core/ViewConfig';
import { ViewConfigStore } from './ViewConfigStore';
import { BaseEntityService } from '../BaseEntityService';
import { IndexedDBContext } from '../IndexedDBContext';

export class ViewConfigService extends BaseEntityService<ViewConfig> {
  readonly storeName = ViewConfigStore.STORE_NAME;
  readonly entityType: EntityType = 'ViewConfig';

  constructor(context: IndexedDBContext, eventBus: IEventBus) {
    super(context, eventBus);
  }

  async getById(id: string): Promise<ViewConfig | null> {
    return this.get(id);
  }
}
