import type { IiosPlatformPorts } from '@insignia/iios-contracts';
import { FakeSession } from './session';
import { FakeOpa } from './opa';
import { FakeCmp } from './cmp';
import { FakeMdm } from './mdm';
import { FakeCrre } from './crre';
import { FakeSas } from './sas';
import { FakeCapability } from './capability';
import { FakeInference, makeFakeInference } from './inference';

export { FakeSession, FakeOpa, FakeCmp, FakeMdm, FakeCrre, FakeSas, FakeCapability };
export { FakeInference, makeFakeInference };

/** The full set of fakes, typed so tests can reach each fake's control methods. */
export interface FakePorts extends IiosPlatformPorts {
  session: FakeSession;
  opa: FakeOpa;
  cmp: FakeCmp;
  mdm: FakeMdm;
  crre: FakeCrre;
  sas: FakeSas;
  capability: FakeCapability;
}

/** Assemble a fresh, fully-faked IiosPlatformPorts (all default to "happy"). */
export function makeFakePorts(): FakePorts {
  return {
    session: new FakeSession(),
    opa: new FakeOpa(),
    cmp: new FakeCmp(),
    mdm: new FakeMdm(),
    crre: new FakeCrre(),
    sas: new FakeSas(),
    capability: new FakeCapability(),
  };
}
