import { IBaseFleioObjectModel } from '@fleio-api/base-model/base-fleio-object.model';
import { ISummaryCardData } from './card-data/summary-card-data';
import { IDetailsData } from './details/details-data';
import { BehaviorSubject, Observable, Subject } from 'rxjs';
import { IActionResult } from './actions/action-result';
import { IPermissionsModel } from '@fleio-api/base-model/IPermissionsModel';

export interface IObjectController {
  object: IBaseFleioObjectModel;
  additionalObjects?: {[objectName: string]: any};
  actionCallback: (CallbackAction) => Observable<IActionResult>;
  dialogActionCallback?: () => void;
  currentTabIndex$: Observable<number>;
  currentTabIndex: BehaviorSubject<number>;
  dataChanged$: Observable<IObjectController>;
  permissions: IPermissionsModel;
  readonly state: string;
  componentEvent$?: Observable<any>;
  componentEvent?: Subject<any>;
  loading?: boolean;

  getSummaryCardData?(): ISummaryCardData;
  getDetailsCardData(): IDetailsData;
}
